# Since all are false, false is returned
print (any([False, False, False, False]))
# Here the method will short-circuit at the
# second item (True) and will return True.
print (any([False, True, False, False]))
# Here the method will short-circuit at the
# first (True) and will return True.
print (any([True, False, False, False]))
>>> multiples_of_6 = (not (i % 6) for i in range(1, 10))
>>> any(multiples_of_6)
True
>>> list(multiples_of_6)
[False, False, False]
# Here all the iterables are True so all
# will return True and the same will be printed
print (all([True, True, True, True]))
# Here the method will short-circuit at the
# first item (False) and will return False.
print (all([False, True, True, False]))
# This statement will return False, as no
# True is found in the iterables
print (all([False, False, False]))