Built-in Functions and Types

all()

Check that every item passes truth testing. Stop as soon as a false item is encountered. An empty iterable succeeds because no item violates the condition. This can consume only part of an iterator; it does not evaluate every item when an early failure is found.

Formal Syntax & Structure

python syntaxpython
all(iterable, /)

Parameters & Attributes

NameTypeDescription
iterableiterableItems to test for truthiness.

Return Value

bool

Boolean result of the truth test across the iterable.

Working Example

Example Snippetpython
checks = [True, True, False]print(all(checks))print(all([]))
Python Reference