What is the result of `isinstance(True, int)` in Python?

Python Professional Hard

Python Professional — Hard

What is the result of `isinstance(True, int)` in Python?

Key points

  • Boolean values in Python are subclasses of integers
  • `isinstance()` function checks if an object is an instance of a class
  • True is considered an instance of the int class in Python

Ready to go further?

Related questions