title: for i in range(start,stop,step) Python 3
body: <p>I want to list a range of numbers and I'm using the "for i in range(start,stop,step)".</p>
  
  <pre><code>def range():
      P=36
      for i in range(P+1,0,-1):
          P=P-4
          print(P)
  </code></pre>
  
  <p>I want to list the numbers down to 0 but it goes all the way to -112. </p>
  
  <p>I found that if I do this though:</p>
  
  <pre><code>def test():
      P=36
      for i in range(P+1,28, -1):
          P=P-4
          print(P)
  </code></pre>
  
  <p>It would now stop at 0.
  Could someone please explain why it does this and doesn't actually STOP at 0? Sorry, I'm new to this and I'm super confused. I would also like the results listed to be able to be referred to afterwards, like stringing the results together to form a line with a polygon but can't simply write</p>
  
  <pre><code>list(P)
  </code></pre>
  
  <p>instead of <code>print(P)</code></p>