What does type(type) return?
Options
- object
- type (Correct option)
- class
- NameError
Answer
type
Why
In Python, classes are objects too, and the thing that creates classes is called a metaclass. The default metaclass is type.
type(5) is int, type(int) is type, and type(type) is type itself: the chain ends there.
Remember
type is the default metaclass and its own type.