Closest pair sum

items is a sorted list of at least two whole numbers. Write closest_pair_sum(items, target) that returns the sum of the two different items whose sum is closest to target. If two sums are equally close, return the smaller sum.

closest_pair_sum([1, 3, 5, 8, 12], 10)   ->  9      (1 + 8; 11 is equally close but larger)
closest_pair_sum([1, 3, 5, 8, 12], 20)   ->  20     (8 + 12)
closest_pair_sum([-4, -1, 2, 6], 0)      ->  1      (-1 + 2)

The point is to practise two pointers from both ends of a sorted list.

def closest_pair_sum(items, target):
    ...