Introduction
The enumerate() function helps you get both the position (index) and the value from a list or other collection while looping. It makes counting items easy and clear.
When you want to loop over a list and need to know the position of each item.
When you want to print items with their numbers, like a numbered list.
When you want to update items in a list by their position.
When you want to compare items with their index in a loop.