pymodule2-2
pymodule2-2
by
Karuna Bhalerao
Assistant Professor, VJTI, Matunga, Mumbai
400019
Contact: [email protected]
Mob: 8378919162
Datatypes & Operators in Python
Part-I
• Comments
• Docstrings
• Built-in-data types
• Sequences
• Sets
• Literals
• User defined data types
2
Datatypes in Python
Part-II
• Basic Operators
• Membership Operators
• Operator precedence and associativity
• Output & Input statements
• Command line statement
• Control Statement
3
Comments
4
Types of Comments
5
Types of Comments
6
Docstrings
7
Docstrings
8
Docstrings
9
Assignment operator
10
How Python Sees Variable
How Python Sees Variable
How Python Sees Variable
How Python Sees Variable
Datatypes in Python
I. None Type
II. Numeric Type
III. Sequence
IV. Sets
V. Mapping
I. None Type
II. Numeric Types
II. Numeric Types
Binary, Oct and Hex Number
20
Converting Datatypes
Converting Datatypes
Bool Datatype
III. Sequence in Python
1. str Datatype
1. str Datatype
1. Str Datatype
1. str Datatype
1. str Datatype
len Function
30
2. bytes Datatype
1. bytes type array
2. bytes Datatype
2. bytearray type array
3. List Datatype
3. List Datatype
• Deleting elements from list
3. List Datatype
• Built-in list methods
3. List Datatype
3. List Datatype
3. List
List methodsDatatype
and their
discription
3. List Datatype
3. List Datatype
40
3. List Datatype
3. List Datatype
3. List Datatype
3. List Datatype
3. List Datatype
3. List Datatype
3. List Datatype
3. tuple Datatype
3. tuple Datatype
4. range Datatype
50
IV. Sets
IV. Sets
V. Mapping
V. Mapping
Literals in Python
Literals in Python
Literals in Python
User Defined Datatype
60
User Defined Datatype
User Defined Datatype
End of Part I
of Module II