type() in python

26

>>> print(type(7), type(7.5), type('hello'), type(int))
<class 'int'> <class 'float'> <class 'str'> <class 'type'>
b = ["Geeks", "for", "Geeks"]

print(type(b))

Comments

Submit
0 Comments