Scroll Down to See All▾
absaiteranextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodenumerateevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceissubclassiterlenlistlocalsmapmaxmemoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip__import__clear_(dict)clear_(list)clear_(set)copy_(dict)copy_(list)copy_(set)fromkeysgetitemskeyspop_(dict)pop_(list)pop_(set)popitemsetdefaultupdatevaluescount_(tuple)count_(list)count_(str)index_(tuple)index_(list)index_(str)adddifferencedifference_updatediscardintersectionintersection_updateisdisjointissubsetissupersetremove_(set)remove_(list)symmetric_differencesymmetric_difference_updateunionupdateclosefilenoflushisattyreadreadablereadlinereadlinesseekseekabletelltruncatewritablewritewritelinesappendextendinsertreversesortcapitalizecasefoldcenterencodeendswithexpandtabsfindformatisalnumisalphaisasciiisdecimalisdigitisidentifierislowerisnumericisprintableisspaceistitleisupperjoinljustlowerlstripmaketranspartitionreplacerfindrindexrjustrpartitionrsplitrstripsplitsplitlinesstartswithstripswapcasetitletranslateupperdirzfillFunction Details: all
Description
Returns True if all elements of the iterable are true (or if the iterable is empty).
Extended Description
The all() function returns True if all elements in the given iterable are true. If the iterable is empty, it returns True. It's equivalent to using the and operator between all elements in the iterable. The function short-circuits; it stops iterating as soon as it finds a false value.
Exceptions
- TypeError: If the argument is not iterable
Read More about all from Python Documentation
Function Signature
all(iterable: Iterable) -> bool
Module: builtins
Parameters
This function takes one parameter: iterable (an Iterable object). This can be any iterable such as a list, tuple, set, or generator.
Parameter List
- iterable: Iterable
Return
Returns a boolean value. True if all elements are true (or if the iterable is empty), False otherwise.
Return Type
bool
Output
Explanation
This example shows how all() behaves with different types of iterables, including an empty iterable.