Beginner
Python
Q40 / 101
What does enumerate() do?
Correct! Well done.
Incorrect.
The correct answer is C) Adds an index counter to an iterable, yielding (index, value) pairs
C
Correct Answer
Adds an index counter to an iterable, yielding (index, value) pairs
Explanation
for i, val in enumerate(["a","b","c"]) yields (0,"a"), (1,"b"), (2,"c"), avoiding manual index tracking.
Progress
40/101