In python I usually loop through ranges simply by
for i in range(100): #do something
but now I want to skip a few steps in the loop. Mo
Why not just set the value to skip until? Like:
skip_until = 0 for i in range(100): if i < skip_until: continue if SOME_CONDITION: skip_until = i + 10 DO_SOMETHING()
where SOME_CONDITION is whatever causes you to skip and DO_SOMETHING() is the actual loop contents?