python for each loop with index code example
Example 1: python3 iterate through indexes
items=['baseball','basketball','football']
for index, item in enumerate(items):
print(index, item)
Example 2: python get index and value from list
test = [ 'test 1', 'test 2', 'test 3' ]
for index, value in enumerate( test ):
print( index, value )