input: Write a function to find the intersection of two sorted lists.
  assert intersection([1, 3, 5, 7, 9], [3, 5, 7, 11]) == [3, 5, 7]
  assert intersection([10, 20, 30, 40], [5, 10, 15, 20, 25, 30]) == [10, 20, 30]
  assert intersection([2, 4, 6, 8], [1, 2, 3, 4, 5, 6]) == [2, 4, 6]
output: def intersection(list1, list2):
      i, j = 0, 0
      result = []
      while i < len(list1) and j < len(list2):
          if list1[i] == list2[j]:
              result.append(list1[i])
              i += 1
              j += 1
          elif list1[i] < list2[j]:
              i += 1
          else:
              j += 1
      return result