
Reet C. answered 04/19/19
Tutor
5
(10)
Computer Engineer With A Passion For Teaching!
a = 1
print(type(a)) # <class 'int'>
By using the type function in Python you can find out the type of a variable. This extends to floats, booleans, functions, classes etc.