# Python3 code to iterate over a list list = [1, 3, 5, 7, 9] # Using enumerate() for i, val in enumerate(list): print (i, ",",val)
for index, item in enumerate(list): print index print item