6. Numbers
There are three numeric types in Python: int float complex Variables of numeric types are created when you assign a value to them: Example x = 1 # inty = 2.8 # floatz = 1j # complex To verify the type of any object in Python, use the type() function: Example print(type(x))print(type(y))print(type(z)) Output:<class ‘int’><class ‘float’><class ‘complex’> Int Int, or integer, is a… Read More »