Question
A loop needs both each item and its position. Which built-in function is most suitable?
Select an option. Your answer will be checked instantly.
Correct Answer: B. `enumerate`
Explanation:
`enumerate` yields pairs containing an index and the corresponding item from an iterable. It avoids manually maintaining a separate counter.
Leave a Reply