1) LANGUAGE FUNDAMENTALS
Introduction
Features of Python
1) Simple and Easy to Learn
2) Freeware and Open Source
3) High Level Programming Language
4) Platform Independent
5) Portability
6) Dynamically Typed
7) Both Procedure Oriented and Object Oriented
8) Interpreted
9) Extensible
10) Embedded
11) Extensive Library
Limitations of Python ……………………………………………………………………. 5
Flavors of Python …………………………………………………………………………… 6
1) CPython
2) Jython OR JPython
3) IronPython
4) PyPy
5) RubyPython
6) AnacondaPython
Python Versions …………………………………………………………………………….. 6
Identifiers ………………………………………………………………………………………. 7
Reserved Words ……………………………………………………………………………… 9
DATA TYPES ……………………………………………………………………………………. 10
1) int Data Type Decimal Form Binary Form Octal Form Hexa Decimal Form
2) Float Data Type
3) Complex Data Type
4) bool Data Type
5) str Data Type
6) bytes Data Type
7) bytearray Data Type
8) List Data Type
9) Tuple Data Type
10) Range Data Type
11) Set Data Type
12) frozenset Data Type
13) dict Data Type
14) None Data Type
Base Conversions ……………………………………………………………………………. 12
Slicing of Strings ……………………………………………………………………………… 16
TYPE CASTING …………………………………………………………………………………. 18
int() float() complex() bool() str()
Fundamental Data Types vs Immutability ……………………………………… 21
Escape Characters ……………………………………………………………………….… 31
Constants ……………………………………………………………………………………… 31
2) OPERATORS ……………………………………………………………………….… 32
1) Arithmetic Operators ……………………………………………………………… 33
2) Relational Operators OR Comparison Operators …………………….. 35
3) Equality Operators …………………………………………………………………. 36