ID EN
Built-in Functions

all

Python 3.11

Return True if all elements of the iterable are true (or if the iterable is empty). Equivalent to:

Syntax

PYTHON
all(iterable)

Examples

Example 1
PYTHON
def all(iterable):
    for element in iterable:
        if not element:
            return False
    return True