Content
-Basics
-Python-Object-Oriented
-Supports polymorphism, operation overloading, and multiple inheritances
open source
-Coherence-not hard to read, write and maintain
-Portable
-Runs on virtually every major platform
-Dynamic Typing
-Built-in types and tools
-Libraries utilities
-Third-party Utilities
-Numeric, NumPy, SciPy
-Strong numeric processing capabilities: Matrix Operation
-Suitable for Probability and Machine Learning
-Automatic Memory Management
-Can be used for Web, Graphical User Interface and Scripting
-Intuitive structure and syntax
-Development speed of an interpreter without the performance loss inherent in purely interpreted languages

The program is automatically compiled to an intermediate form called byte-code which the interpreter then reads.
Python also an interpreter
The interpreter reads other Python programs and commands and executes them.
$ sign -the start of a terminal command line

Scripts can be read into the interpreter in several ways
python script.py #Executes the script and returns to the terminal
python -i script.py
Flag -i keeps interpreter opens after script is executed

Assume a python script.py with following lines
print("Hello World")
x=[0,1,2] 

python script.py
The script will be executed and the interpreter is immediately close.
value of x will be lost
python -i script.py
but after executing the above function value of x will be stored and the interpreter will be left open.

a=”hello”
a*+3;
then the output will be hellohellohello
also, you can append any string with it
using
a+=”world”
We cannot use division and subtraction signs with the strings.
Suppose a = 1

a == 1
Output: True
(a == 1) == True
Output:True
Now suppose a = 2
a == 1
Output: False
(a == 1) == True
Output: False

Number Types
Operation having floats and integer yields float
Octal and hexa-decimal concept remains the same.
Complex number must end with j or J.
4+5j
So the general form of the above statement will be a+bJ OR a+bj
a**b is used for exponentiation
Concept of bitwise OR, AND , EXCLUSIVE OR , SHIFT RIGHT, SHIFT LEFT remains the same.

Indexing and slicing
s=”string”
s[1] // Output will be t
s[i:j] fetches elements i (inclusive) through j (not inclusive)
s[1:4] means it will fetch “tri”
To fetch an element up to the (j+1)th term not including j
we just have to write
s[:3] //output will be “str”
and likewise you can figure out for s[1:]
s[i:j:k] extracts every kth element starting with index i (inclusive) and ending with index j (not inclusive)
Negative indexes denotes to extract the first element from end (s[len(s]-1)

Remember list is always contained in square bracket.
Numbers, strings, nested sub-lists or nothing.
L1=[1,2,3,4]
L=[0,1,[2,3]”three” , [“Four,one'”]]
L2=[“ZERO”, “ONE”]

Mutable: individual elements can be reassigned in place.
Members can grow and shrink in place.
L1=[13,23,34]
L1[0]=4 //values can be updated.

List operations are as follows
Indexing
Slicing
Concatenation
Repetition
Append
Sort