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).
This is the example of the result:

This is what I've tried:
def sum_range(int1,int2):
count = 0
for i in range(int1,int2+1):
count = count + i
return count
but for this example:
result = sum_range(3, 2)
print(result)
I got the wrong result, can anyone help?