<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def range_span(ranges):
 """ Returns the total span between the left most range to the right most range. 41 27 21 0 """

    if not ranges:
        return 0

    ranges.sort()
    ans = 0
    for seq, lt in groupby(ranges, key=lambda x: x[0]):
        lt = list(lt)
        ans += max(max(lt)[1:]) - min(min(lt)[1:]) + 1
    return ans