title: How to get a decrement in a list?
body: <p>here' my code , outputs right if it's incrementing, when decrements stack with empty list</p>
  <pre><code>
  def generate_list(start, stop, step):
    new_list=[]
    while start &lt; stop:
      new_list.append(start)
      start += step
      if step &lt; 0:
        start -= step
    return new_list
  
  Output:
  &gt; generate_list(0,5,1)
  [0, 1, 2, 3, 4]
  &gt; generate_list(0,0,1)
  []
  &gt; generate_list(5,10,2)
  [5, 7, 9]
  &gt; generate_list(10,5,-2)
  [10, 8, 6]
  </code></pre>