Last modified: Mar 13, 2026 By Alexander Williams

Python List All True Booleans: Check & Create

Working with lists of booleans is common in Python. You often need to verify if every condition is met. This means checking if all values in a list are True.

This guide shows you how to do that. We will cover simple checks and list creation. You will also learn about related concepts like truthy and falsy values.

What is a Boolean in Python?

A boolean is a data type. It has only two values: True and False. They are the result of comparison or logical operations.

For a deeper dive into their fundamentals, see our guide on Python Booleans: True, False, Logic Explained.

Booleans are essential for control flow. They decide if an if statement runs or a while loop continues.

Creating a List of All True Booleans

Let's start by making a list where every element is True. This is straightforward.


# Creating a list with all True values
all_true_list = [True, True, True, True]
print(all_true_list)
    

[True, True, True, True]
    

You can also generate one using list multiplication. This is useful for a fixed size.


# Generate a list of 5 True values
large_true_list = [True] * 5
print(large_true_list)
    

[True, True, True, True, True]
    

How to Check If All Booleans Are True

You have a list. Now you need to verify its state. Python offers several clean methods.

Method 1: The all() Function

The built-in all() function is the standard tool. It returns True only if every element in an iterable is truthy.


# Using the all() function
bool_list = [True, True, True]
result = all(bool_list)
print(f"All values True? {result}")

# It will fail if one value is False
mixed_list = [True, False, True]
result2 = all(mixed_list)
print(f"All values True? {result2}")
    

All values True? True
All values True? False
    

The all() function is the most Pythonic and readable choice for this task.

Method 2: Using a For Loop

You can write an explicit loop. This gives you more control. You can break early if you find a False.


# Manual check with a for loop
def check_all_true(boolean_list):
    for value in boolean_list:
        if not value:  # If value is False (or falsy)
            return False
    return True

# Test the function
test_list = [True, True, True]
print(check_all_true(test_list))  # Output: True

test_list2 = [True, False, True]
print(check_all_true(test_list2)) # Output: False
    

Method 3: Comparison with sum()

Since True equals 1 and False equals 0, you can use sum(). If the sum equals the list length, all are True.


# Check using sum()
my_list = [True, True, True]
are_all_true = sum(my_list) == len(my_list)
print(are_all_true)  # Output: True
    

This method is clever but less direct than all().

The Crucial Role of Truthy and Falsy Values

all() checks for truthiness, not just the boolean True. This is a vital distinction.

In Python, values like 1, non-empty strings, and non-empty lists are truthy. They evaluate to True in a boolean context.

Values like 0, empty strings "", and empty lists [] are falsy. They evaluate to False.


# all() with truthy values
truthy_list = [1, "hello", [1, 2], True]
print(all(truthy_list))  # Output: True. All are truthy.

# all() with one falsy value
falsy_list = [True, "text", 0]  # 0 is falsy
print(all(falsy_list))   # Output: False
    

If you need strict boolean checks, convert elements first. Use a generator expression with all().


# Strict check for the boolean True only
strict_list = [True, 1, "True"]  # 1 and "True" are truthy but not bool True
strict_check = all(item is True for item in strict_list)
print(strict_check)  # Output: False
    

For working with boolean-specific data structures, our resource on Python Boolean Arrays: Guide & Examples can be very helpful.

Practical Example: Validating User Input

Imagine a form with multiple checkboxes. A user must agree to all terms. A list stores their answers.


# Simulating user agreement checks
user_agreements = [True, True, False, True]  # User missed one

if all(user_agreements):
    print("All terms accepted. Proceeding.")
else:
    print("Please accept all terms to continue.")
    # Find which one is False
    for index, agreed in enumerate(user_agreements):
        if not agreed:
            print(f"Please check agreement #{index + 1}")
    

Please accept all terms to continue.
Please check agreement #3
    

This shows how all() is useful in real applications.

Common Pitfalls and Best Practices

Avoid these common mistakes when checking lists.

Empty Lists: The all() function returns True for an empty list. This is a mathematical convention.


print(all([]))  # Output: True
    

Check if the list is empty first if this is not your intended logic.

Using and Incorrectly: You cannot use and directly on a list.


# This does NOT work as expected
list1 = [True, True, False]
# result = list1[0] and list1[1] and list1[2] # Manual way, not scalable
# Use all() instead.
    

Always prefer all() for readability and scalability. For more on boolean logic, refer to our Python Booleans Guide: True, False, Logic.

Conclusion

Checking if a Python list contains all True booleans is simple. Use the built-in all() function. It is efficient and clear.

Remember the difference between truthy values and the boolean True. This prevents logic errors.

You can also create lists of all True values easily. Use list multiplication for large, uniform lists.

Mastering these techniques makes your code more robust. It is essential for data validation and conditional logic.