Meet in the middle with two pointers
In a sorted list, a pair that sums too low needs a larger left value and a pair that sums too high needs a smaller right value. Two indices moving toward each other test every useful pair once.
items = [1, 3, 4, 6, 9]
left, right = 0, len(items) - 1
print(items[left] + items[right]) # 10Think before coding
When the sum is too small, no pair using the current left value can work with any smaller right value, so the left value is finished. The symmetric argument retires the right value. The scan is linear instead of quadratic. Work through the example by hand before changing the starter. Decide what should happen for an empty input, a single value and a repeated value where those cases apply. The checks use several inputs so a hard-coded answer cannot stand in for the rule.
Your task
Write pair_with_sum(items, target) for a sorted list. Return a tuple of two indices (i, j) with i < j whose values add up to target, or None.
The explanation opens here once every check passes.