Skip to content

True

In Python, the True keyword represents a Boolean value indicating a truth value in logical operations and expressions. It’s defined as a built-in constant that’s an instance of the bool type, which is a subclass of int, and it has a numeric value of 1.

Python True Keyword Examples

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

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

In this example, the conditional checks the value of is_adult. Because it’s True, the if clause runs.

Python True Keyword Use Cases

Python Booleans: Optimize Your Code With Truth Values

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 stdlib

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


By Leodanis Pozo Ramos • Updated July 16, 2026 • Reviewed by Dan Bader