# What does all mean in Python?

In Python, the `all()` function returns `True` if all elements of an iterable (e.g. list, tuple, etc.) are true, and `False` otherwise. For example:

```python
>>> all([True, True, True])
True
>>> all([True, False, True])
False
```

An empty iterable returns `True`.

```python
>>> all([])
True
```

It can also be used on a generator object.

```python
>>> all(i > 2 for i in [1, 2, 3, 4])
False
```

It is equivalent to the following code:

```python
>>> def all(iterable):
...     for element in iterable:
...         if not element:
...             return False
...     return True
```