pyton print class type code example
Example 1: python get type class name
type(x).__name__
Example 2: type of object python
>>> type([]) is list
True
>>> type({}) is dict
True
>>> type('') is str
True
>>> type(0) is int
True
type(x).__name__
>>> type([]) is list
True
>>> type({}) is dict
True
>>> type('') is str
True
>>> type(0) is int
True