any and all can be think of as a series of logical or and and operators.
any will return True when at-least one of the elements is True
all will return True only when all the elements are True
Internal structure of any(iterable)
def any(iterable): for element in iterable: if element: return True return False
Internal structure of all(iterable)
def all(iterable): for element in iterable: if not element: return False return True
print(any(i == 'i' for i in 'asdfisadf')) #return True print(all(i == 'i' for i in 'iiia')) #return False