foreach loop in python with index

for index, item in enumerate(items):
    print(index, item)

#if you want to start from 1 instead of 0
for count, item in enumerate(items, start=1):
    print(count, item)

Here is what the above code is Doing:
1. We create a list of items.
2. We use enumerate() to loop over the list and get the index and value of each item in the list.
3. We print the index and value of each item in the list.
4. We use enumerate() to loop over the list and get the index and value of each item in the list.
5. We print the index and value of each item in the list.