{"id":24553,"date":"2021-10-21T10:14:55","date_gmt":"2021-10-21T04:44:55","guid":{"rendered":"https:\/\/python-programs.com\/?p=24553"},"modified":"2021-11-05T19:36:59","modified_gmt":"2021-11-05T14:06:59","slug":"python-all-function-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-all-function-with-examples\/","title":{"rendered":"Python all() Function with Examples"},"content":{"rendered":"

In the previous article, we have discussed Program for Python String swapcase() Function<\/a>
\nall() Function in Python:<\/strong><\/p>\n

The function all() returns If all of the items in an iterable are true, it returns True; otherwise, it returns False.<\/p>\n

The all() function returns True if the iterable object is empty.<\/p>\n

Syntax:<\/strong><\/p>\n

all(iterable)<\/pre>\n

Parameters<\/strong><\/p>\n

iterable: <\/strong>It may be any iterable object like list, tuple, dictionary, set, etc.<\/p>\n

Note:<\/strong> When applied to a dictionary, the all() function determines whether all of the keys are true, rather than the values.<\/p>\n

Return value:<\/strong><\/p>\n

The function all() returns:<\/p>\n