Python Numbers
01
Numeric Types
There are three numeric types in Python: int, float, complex.
Example
x = 1
y = 2.8
z = 1j
print(type(x))
print(type(y))
print(type(z))Output
<class 'int'> <class 'float'> <class 'complex'>
There are three numeric types in Python: int, float, complex.
x = 1
y = 2.8
z = 1j
print(type(x))
print(type(y))
print(type(z))Output
<class 'int'> <class 'float'> <class 'complex'>