python script for loop list index and value code example
Example 1: python3 iterate through indexes
items=['baseball','basketball','football']
for index, item in enumerate(items):
print(index, item)
Example 2: get index in foreach py
for idx, val in enumerate(ints):
print(idx, val)