Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
enumerate
enumerate
Return an enumerate object. iterable must be a sequence, an iterator, or some other object which supports iteration.
Python 3.13
enumerate
(
iterable
,
start
=
0
)
iterable
An iterable object.
start
The starting value of the counter.
Examples
Python 3.13
>>
>
list
(
enumerate
(
[
'a'
,
'b'
,
'c'
]
)
)
[
(
0
,
'a'
)
,
(
1
,
'b'
)
,
(
2
,
'c'
)
]