Python Numbers
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:
Examples
To verify the type of any object in Python, use the type() function:
Int
Whole numbers
Float
Numbers with decimal values
Complex
Complex numbers with "j" that denote the imaginary part.