#Using the all() Function

print(all([1, 2, 3, 4, 5]))

print(all([0, 1, 2, 3, 4, 5]))

The all() function checks whether  all elements in a given iterable have a boolean value of True.

The function takes one argument, an iterable object such as a list, set, tuple etc.

iterable An iterable object containing the elements to be checked

The function returns a boolean value. True if all the values in the iterable have a boolean value of  True or the iterable is empty, False otherwise.


all([1, 2, 3])
all([0, 1, 2, 3])
all(['Hello', 'Python', 'World'])
all(('Hello', 'Python', 'World', ''))