python gt index in for cycle

my_list = [0,1,2,3,4]
for idx, val in enumerate(my_list):
    print('{0}: {1}'.format(idx,val))
#This will print:
#0: 0
#1: 1
#2: 2
#...

Here is what the above code is Doing:
1. We create a list called my_list.
2. We iterate through the list using a for loop.
3. We use the enumerate function to get the index and value of each element in the list.
4. We print the index and value of each element in the list.