Question #87

Which function allows accessing indexes in for loops?

enumerate() allows to iterate over something and have an automatic counter at the same time.

for counter, value in enumerate(some_list):
    print(counter, value)

(book.pythontips.com/en/latest/enumerate.html)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵