0% found this document useful (0 votes)
0 views63 pages

pymodule2-2

The document is a course outline on Python programming by Karuna Bhalerao, focusing on datatypes and operators. It covers built-in and user-defined datatypes, basic and membership operators, and includes sections on comments, docstrings, and control statements. The document is divided into two parts, detailing various data types and their functionalities in Python.

Uploaded by

ryanut.jb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views63 pages

pymodule2-2

The document is a course outline on Python programming by Karuna Bhalerao, focusing on datatypes and operators. It covers built-in and user-defined datatypes, basic and membership operators, and includes sections on comments, docstrings, and control statements. The document is divided into two parts, detailing various data types and their functionalities in Python.

Uploaded by

ryanut.jb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Python Programming [R4ET2015T+P]

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

• A datatype represents the type of data


stored into a variable memory
• Built-in datatypes: already available
datatype in Python
• User-defined datatypes: not available but
can be created by programmer.
Datatypes in Python

Built-in datatypes: following are 5 built-in datatpyes

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

• Determine existing data’s datatype


User Defined Datatype
• Determine existing data’s datatype
User Defined Datatype

• What are user defined datatypes ?

60
User Defined Datatype
User Defined Datatype
End of Part I
of Module II

You might also like