Two sum on a sorted list

When the list is sorted, two positions can find a pair that sums to a target without checking every pair. Put one position at the start and one at the end. If the two values add up to the target, you are done. If the sum is too small, only moving the left position rightwards can make it bigger; if too large, only moving the right position leftwards can make it smaller. Repeat until the positions meet.

Write pair_sum(sorted_nums, target) that returns the two positions as a tuple (left, right), or None if no pair works. Values are distinct.

pair_sum([1, 3, 4, 6, 8], 10)  ->  (2, 3)
pair_sum([1, 2], 10)           ->  None
def pair_sum(sorted_nums, target):
    ...