Python any() built-in function

From the Python 3 documentation

Return True if any element of the iterable is true. If the iterable is empty, return False.

Examples

>>> any([False, False, False])
# False

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

>>> any({0, 0, 0})
# False

Subscribe to pythoncheatsheet.org

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