Scroll Down to See All▾
absaiterallanextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceissubclassiterlenlistlocalsmapmaxmemoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip__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: enumerate
Description
Returns an enumerate object.
Extended Description
The enumerate() function creates an iterator of tuples containing indices and values from an iterable. It's useful when you need both the index and value while iterating over a sequence. The optional start parameter specifies the start value for the counter.
Exceptions
- TypeError: If the first argument is not iterable
Read More about enumerate from Python Documentation
Function Signature
enumerate(iterable: Iterable, start: int = 0) -> enumerate
Module: builtins
Class: enumerate
Parameters
iterable: Any iterable object (e.g., list, tuple, string). start: The index value from which the counter is to be started, defaults to 0.
Parameter List
- iterable: Iterable
- start: int
Return
Returns an enumerate object, which yields tuples containing a count (from start, which defaults to 0) and the values obtained from iterating over the given iterable.
Return Type
enumerate
Output
Explanation
This example shows basic usage of enumerate(), both with and without a custom start value.