Returns True if any element of the iterable is true.
Syntax
any(iterable)Example
Enter values below to update the example in real time.
print→nums→for→print(any([False, False, True])) # True
print(any([False, False, False])) # False
nums = [1, 3, 5, 8]
print(any(n % 2 == 0 for n in nums)) # True