Repaso
EspaƱol
PythonAdvancedPY-25

What does type(type) return?

Options

  1. object
  2. type (Correct option)
  3. class
  4. 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.

Key terms

Practice this question in Repaso