5 lines
103 B
Python
5 lines
103 B
Python
def sum_range(a: int, b: int, /) -> int:
|
|
if a > b:
|
|
a, b = b, a
|
|
return sum(range(a, b))
|