5.01
Completed
Python Boolean Values Python Boolean Values

Learn Python booleans: True, False, bool, flags, and why "True" is not the same as True.

Python Boolean Values

Sounds useful?

Jump into the interactive version.

No setup. No account. Just Python.

Interactive Python lesson

Boolean Values in Python

This Block introduces one of Python’s smallest but most important ideas: boolean values. You will learn how True and False work, how to store them in variables, and why booleans are perfect for yes/no facts like is_raining, has_paid, or can_go_out.

We keep it beginner-friendly and practical: real examples first, theory second. You will also see common traps, like writing true instead of True, or accidentally using "False" as text when you wanted the boolean value False.

What you will learn:

  • Use the two Python boolean values: True and False
  • Understand the bool type and check it with type()
  • Name boolean variables clearly with patterns like is_, has_, can_, and should_
  • Tell the difference between real booleans and strings like "True" or "False"

By the end, you will be comfortable using booleans as small status flags in your code. Tiny values, big responsibility. Python likes them capitalized, and now you will too.

> Start now 116 cards · about 6 min

Ready to practice this in the browser?

> Play now