title: Change Python for loop range (higher limit) at runtime
body: <p>How do I change the higher limit of a python  for loop at runtime?</p>
  
  <p>The code,</p>
  
  <pre><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)
  </code></pre>
  
  <p>The code runs till the first higher limit and doesn't care about the declared one, What can be done to make this work?</p>