1list = [1, 3, 5, 7, 9]
2
3# with index
4for index, item in enumerate(list):
5 print (item, " at index ", index)
6
7# without index
8for item in list:
9 print(item)
1thisList = [1, 2, 3, 4, 5, 6]
2
3x = 0
4while(x < len(thisList)):
5 print(thisList[x])
6 x += 1
7
8# or you can do this:
9
10for x in range(0, len(thisList)):
11 print(thisList[x])
12
13#or you can do this
14
15for x in thisList:
16 print(x)
1lst = [12, 123, 1234, 12345]
2for i in lst:
3 print(i)
4**********************result*********************
512
6123
71234
812345