In any computer programming language, data type defines how a data store in memory. How much memory size occupied by a data is also determined by data types. Like other languages Python has also the following built-in data types.
| Text Type | str |
| Numeric Types | int, float, complex |
| Sequence Types | list, tuple, range |
| Mapping Type | dict |
| Set Types |
set, frozenset |
| Boolean Type | bool |
| Binary Types | bytes, bytearray, memoryview |
A variable is named memory location. That means a variable basically allocates a memory location, which is mapped with a name called variable name. In python, we can declare a variable without any data type. But its data type was set just after we assign a value to it.
We can assign multiple values in different variables in a line.
x,y,z=10,20,30
This line is equivalent to
x=10
y=20
z=30
x=y=z=10
This line is equivalent to
x=10
y=10
z=10