I have a list defined and it gets iter() applied to it. It then goes through a for loop and inside the for loop it gets enumerate(). I want it to print out the output 4 times because it is in the range of 4. Can anyone look and see what the problem might be? I
list_1 = [1,2,3,4,5]
list_1 = iter(list_1)
for x in range(2):
for y,z in enumerate(list_1):
print(str(y)+" "+str(z))
output:
0 1
1 2
2 3
3 4
4 5
desired output:
0 1
1 2
2 3
3 4
4 5
0 1
1 2
2 3
3 4
4 5