Python all() Function

The all() function in Python returns a Boolean value ‘True’ if all the items in iterable are true or if the iterable object is empty, else it returns False.

Syntax

Parameter

Iterable: An iterable object (list, tuple, dictionary)

Return

This function returns a Boolean value true if all the items in an iterable are true else it returns false.

Example 1

Output

Pin It on Pinterest

Share This