title: How to loop a range with python
body: <p>This is my question:
  I have to write a function that accepts 2 integer values as parameters and returns the sum of all the integers between the two values, including the first and last values. The parameters may be in any order (i.e. the second parameter may be smaller than the first).</p>
  
  <p>This is the example of the result:</p>
  
  <p><img src="https://i.stack.imgur.com/vvxSN.png" alt="screenshot"></p>
  
  <p>This is what I've tried:</p>
  
  <pre><code>def sum_range(int1,int2):
      count = 0
      for i in range(int1,int2+1):
           count = count + i
      return count
  </code></pre>
  
  <p>but for this example:</p>
  
  <pre><code>result = sum_range(3, 2)
  
  print(result)
  </code></pre>
  
  <p>I got the wrong result, can anyone help?</p>