Professional Documents
Culture Documents
It is used for:
Python Indentation
Indentation refers to the spaces at the beginning of a code line.
Python Variables
In Python, variables are created when you assign a value to it. Python has no
command for declaring a variable.
Comments
Python has commenting capability for the purpose of in-code documentation.
Comments start with a #, and Python will render the rest of the line as a
comment:
Python Numbers
There are three numeric types in Python:
int
float
complex
Variables of numeric types are created when you assign a value to them:
String Literals
String literals in python are surrounded by either single quotation marks, or
double quotation marks.
Equals: a == b
Not Equals: a != b
Less than: a < b
Less than or equal to: a <= b
Greater than: a > b
Greater than or equal to: a >= b
With the for loop we can execute a set of statements, once for each item in a
list, tuple, set etc.
Python Functions
A function is a block of code which only runs when it is called.