I like Grijesh's answer, simple and elegant. Here is another take on it, using a recursive call:
global sum
def sum_between(a, b):
global sum
# base case
if (a + 1) == b:
return sum
else:
sum += (a + 1)
return sum_between(a + 1, b)
Not as straight forward as using sum(range(a+1, b)). But simply interesting as an exercise in recursive functions.