Home >>Python Built-in Functions >Python all() Function
Python all() function is used to return True if all the items present in an iterable are true, otherwise it will return False. If the iterable object is empty then also it will return True.
Syntax:all(iterable)
Parameter | Description |
---|---|
iterable | This parameter contains an iterable object. |
listx = [True, True, True] x = all(listx) print(x)
listx = [0, 1, 1] x = all(listx) print(x)