Enumerate() in Python
When working with iterators, we frequently need to track how many iterations have been completed. Python makes this work easier for programmers by including an enumerate() function. Enumerate() method adds a counter to an iterable and returns it as an enumerating object. This enumerated object can then be used in loops directly or converted to a list of tuples with the list() method.