Python all() FunctionThe python all() function accepts an iterable object (such as list,dictionary etc.). It returns True if all items in passed iterable are true, otherwise it returns False. If the iterable object is empty, the all() function returns True. SignatureParameters
Return
Python all() Function Example 1Let's see how all() works for lists? Output: True False False False True Python all() Function Example 2The below example shows how all() works for dictionaries. Output: True False False True True Python all() Function Example 3The below example shows how all() works for tuples. Output: True False False False
Next TopicPython Built in Functions
|