you would need to increment step
manually which can be done using a while
loop. checkout difference between while and for loop.
The for statement iterates through a collection or iterable object or
generator function.
The while statement simply loops until a condition is False.
if you use a while
loop your code would look something like this:
step = 1
i = 1
while i < 100:
if ...... :
step = 1
#do stuff
else:
step = 2
#do other stuff
i = i + step