How do I change the higher limit of a python for loop at runtime?
The code,
from random import randint
lower_limit = 0
higher_limit = 200
step_size = 5
for i in range(lower_limit, higher_limit, step_size):
# do something
higher_limit = higher_limit + randint(0, 5)
The code runs till the first higher limit and doesn't care about the declared one, What can be done to make this work?