Returns the type of an object.
Syntax
type(object)Example
Enter values below to update the example in real time.
print→type→class→print(type(42)) # <class 'int'>
print(type(3.14)) # <class 'float'>
print(type("hello")) # <class 'str'>
print(type([1, 2])) # <class 'list'>