- Get link
- X
- Other Apps
Python
- High level language
- Object-oriented programming language
- Interpreted scripting language - Debugging fast because there is no compilation
- Dynamic
PYTHON VERSIONS
Python 1.0 - features like: lambda, map, filter, and reduce.
Python 2.0 - features like: list comprehensions, garbage collection system.
Python 3.0 (Py3K)
Latest version of python is 3.7.0
SIMPLE PYTHON PROGRAM
- Save the python files with .py extension
- Execute the python program using below code
python filename.py
Hello.py
print("hello")
Python Variables
- We don't need to specify the type of variable.
- Variable names can be a group of both letters and digits - kt1.
- They have to begin with a letter or an underscore - jk or _h.
- Use lowercase letters for variable name.
- Variable name should not be a keyword.
- We can create variable at required time.
Variable Declarations
a=4
- High level language
- Object-oriented programming language
- Interpreted scripting language - Debugging fast because there is no compilation
- Dynamic
PYTHON VERSIONS
Python 1.0 - features like: lambda, map, filter, and reduce.
Python 2.0 - features like: list comprehensions, garbage collection system.
Python 3.0 (Py3K)
Latest version of python is 3.7.0
SIMPLE PYTHON PROGRAM
- Save the python files with .py extension
- Execute the python program using below code
python filename.py
Hello.py
print("hello")
Python Variables
- We don't need to specify the type of variable.
- Variable names can be a group of both letters and digits - kt1.
- They have to begin with a letter or an underscore - jk or _h.
- Use lowercase letters for variable name.
- Variable name should not be a keyword.
- We can create variable at required time.
Variable Declarations
a=4
ty='software'
sal=2000.5
q=w=e=50
q,w,e=10,20,50
Identifiers
- Names given to variables ,class ,object ,functions , lists , dictionaries.
- An identifier is a long sequence of characters and numbers.
- No special character except underscore ( _ ) can be used as an identifier.
- Keyword should not be used as an identifier name.
- Python is case sensitive. So using case is significant.
- First character of an identifier can be character, underscore ( _ ) but not digit.
Literals
String :-
1) Single line String
a="hai" or a='hai'
2) Multi line String
ab='hai\
hello' o/p - haihello
ab= '''''welcome o/p - welcome
to to
world''' world
Comments
Post a Comment