Learn Before
Code
type() Function
In Python, the type() function is used to return the class (data type) of an object. For example:
print(type(66)) print(type("hello there")) print(type(["General", "Kenobi"]))
will print: <class 'int'> <class 'str'> <class 'list'>
0
2
Updated 2021-01-20
Tags
Python Programming Language
Data Science