Python tip 27: enumerate() function

Опубликовано: 16 Март 2026
на канале: learnbyexample
63
0

When you use a for loop, you get one element per each iteration. If you need the index of the elements as well, use the `enumerate()` built-in function. You'll get a tuple value per each iteration, containing index (starting with 0 by default) and the value at that index.


This video is based on content from my "100 Page Python Intro" ebook: https://github.com/learnbyexample/100...