1def all(iterable):
2 for element in iterable:
3 if not element:
4 return False
5 return True
6
1#all(iterable) returns True if all items in iterable are True
2#ex:
3all([1, 2, 3, "apple", "car"])
4#would return True
5all([3, 1, 4, 1, 5, 0])
6#would return False