There are 6 standard datatypes in Python:
** Once we are well-versed python, we will start working on Libraries such as Numpy, Pandas where we will learn some additional datatypes such as Arrays and Dataframes
*This is an important concept to understand theoretically. In following sessions, we will see the difference:
Immutable: For immutable datatypes, once value is defined for a variable, it cannot be changed or altered. It can only be overwritten.
1.Numbers, we already saw an example :)
Mutable: For mutable datatypes, once value is defined for a variable, it can be changed, altered or overwritten.
Variables are the containers which store some values in it.
Each variable consume some memory and have specific memory locations. In other words, When a user creates a variable, it reserves some space in memory.
Unlike other languages, in python we do not explicitly specify the datatype to be used for a variable. Rather interpreter reads the line and decides the datatype of the variable as per the value given to the variable and reserves memory accordingly.
Equal sign(=) is used to assign a value to a variable. Assigning a value to a variable is knows as variable declaration.
On the left hand of (=) is the variable name and on the right side of (=) is the variable's value.
Reserved Keywords are bag of words which are preserved by python to accomplish specific tasks. Such keywords should not be used as variable names to avoid any errors and to make python's interpreter task easy.
We will use help( ) function to find out all reserved keywords.
help( ) function is used to pull out documentation of any keyword in python
To find out all reserved keywords:
To fetch documentation for specific keyword:
**for keyword is reserved to process loops in python