You are here : python_3Built-in Functionsany

any() - Built-in Functions

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


Syntax

any(iterable)


Example

def any(iterable):
    for element in iterable:
        if element:
            return True
    return False


Output / Return Value


Limitations


Alternatives / See Also


Reference