Skip to content
AgileLogics
3 min read

Boolean Values

Prerequisites: Data types

A boolean is a value that's either True or False — capitalized exactly like that in Python. Booleans are what conditions and comparisons are built from.

is_raining = True
has_umbrella = False
print(5 > 3)       # True
print(5 == "5")    # False — different types never compare equal

Common mistakes

  • Writing true/false in lowercase — Python is case-sensitive and only recognizes True/False.