Booleans (bool)

Booleans represent logical values: True or False.
They are the typical result of comparisons and conditional statements.

is_adult = True
of_age = age >= 18

In logical operations, Python treats the following values as False:

  • False
  • None
  • 0, 0.0
  • "" (empty string)
  • [], {}, set(), ()