Python Booleans

Boolean Type

Boolean values are True or False, representing truth values.

Boolean Operations

  • and, or, not.

Examples

x = True
y = False
print(x and y)   # False
print(x or y)    # True
print(not x)     # False