Mega Code Archive

 
Categories / Python Tutorial / Buildin Function
 

Return True if all elements of the iterable are true

# Equivalent to: # def all(iterable): #    for element in iterable: #        if not element: #            return False #    return True print all(['A', '', 'B'])