Python all() built-in function

From the Python 3 documentation

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

Examples

>>> all([True, True, True])
# True

>>> all((0, True, False))
# False

>>> all({1, 1, 1})
# True

Subscribe to pythoncheatsheet.org

Join 10.900+ Python developers in a two times a month and bullshit free publication , full of interesting, relevant links.