The Python Game Book

code games. learn Python.

User Tools

Site Tools


Sidebar

Github:

en:glossary:a:any

This is an old revision of the document!


any

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

def any(iterable):
    for element in iterable:
        if element:
            return True
    return False</blockquote>
    

any() is part of python's built-in functions

en/glossary/a/any.1589358517.txt.gz · Last modified: 2020/05/13 10:28 by horst