First time here? Check out the FAQ!
answered 2018-07-06 13:49:10 +0100
The following
R = iter(range(9)) for r in R: if r == 3: a = next(R) # remove the next element from the iterator print(r)
produces
0 1 2 3 5 6 7 8