is there any way to send the value of a for look back in few loops..
for i in range(10):
print(i)
if random.randint(0,9) in [5,6]:
i = 0
what i want to do is exactly something like this. now here i know the range(10) generates the range [0,1,2,3,4,5,6,7,8,9] first the then traverse it by assigning the value to i. so simply changing the value of i will not work.
but is there any other way to change i in a way that the value in the next loop will i+1