title: Python3, range(a,b) function behaviour and empty lists
body: <p>I am a bit confused about the behavior of the range() function in a specific use case.</p>
  
  <p>When I was testing some code I wrote using nested FOR loops, in some cases, the statements in certain loops never seemed to execute at all.  I eventually realized that I was in some cases feeding a range() call with an input like: </p>
  
  <p><code>range(i,2)  # where i is 2, giving range(2,2)</code></p>
  
  <p>...which threw no error, but apparently never executed the for loop contents.  After some reading on Python3's FOR implementation, I then added "else:" statements to my loop:</p>
  
  <pre><code>for i in range(a,b):  # where a=b, i.e. range(2,2)
      [skipped code]
  else:
      [other code]
  </code></pre>
  
  <p>...and the else-case code executed fine, as I guess all possible iterators for the given range values were (already) exhausted, and the for-else case was triggered as it's designed to be when that happens.</p>
  
  <p>From what I can see in the documentation for range(), I found: "A range object will be empty if r[0] does not meet the value constraint."  ( <a href="https://docs.python.org/3/library/stdtypes.html#range" rel="nofollow noreferrer">https://docs.python.org/3/library/stdtypes.html#range</a> ).  I'm not quite sure what the "value constraint" is in this case, but if I'm understanding right, "range(a,b)" will return an empty list if a >= b.</p>
  
  <p>My question is, is my understanding correct about when range() returns []?  Also, are there any other kinds of input cases where range(a,b) returns [], or other obscure edge case behaviors I should be aware of?  Thank you.</p>