>>> myList=[10,20,30,40,50] >>> for value in myList: ... print (value) ... 10 20 30 40 50
>>> myList=[10,20,30,40,50] >>> for index, value in enumerate(myList): ... print (index, value) ... 0 10 1 20 2 30 3 40 4 50