False

In Python, the False keyword represents a boolean value that indicates the false truth value in logical operations and expressions. It’s defined as a built-in constant with a value of 0 and is a subclass of int.

Python False Keyword Examples

Here’s an example demonstrating how the False keyword can be used in Python:

Python
>>> is_adult = False
>>> if is_adult:
...     print("They're more than 18 years old")
... else:
...     print("They're less than 18 years old")
...
They're less than 18 years old

In these examples, the conditional check the value of is_adult. Because it’s False, the else clause runs.

Python False Keyword Use Cases

  • Logical operations and comparisons to represent a false truth value
  • Control flow statements like if and while to determine what action to execute
  • Boolean flags in functions to toggle features or options
  • Default argument value in functions and methods

Tutorial

Python Booleans: Use Truth Values in Your Code

In this tutorial, you'll learn about the built-in Python Boolean data type, which is used to represent the truth value of an expression. You'll see how to use Booleans to compare values, check for identity and membership, and control the flow of your programs with conditionals.

intermediate python

For additional information on related topics, take a look at the following resources:


By Leodanis Pozo Ramos • Updated Jan. 13, 2025 • Reviewed by Dan Bader