@stevenrivera
Using "enumerate()" for Iteration with Indices 🔢
The "enumerate()" function allows you to get the index of an element in a loop, simplifying the work with sequences.
Example of using "enumerate()":
# Traditional way
items = ['a', 'b', 'c', 'd']
for i in range(len(items)):
print(i, items[i])
# Using enumerate
for i, item in enumerate(items):
print(i, item)