input: def merge_sorted_lists(listA, listB):
      """
      Merge two sorted lists into a single sorted list.
      >>> merge_sorted_lists([2, 4, 6], [3, 5, 7])
      [2, 3, 4, 5, 6, 7]
      >>> merge_sorted_lists([1, 3, 5], [2, 4, 6])
      [1, 2, 3, 4, 5, 6]
      >>> merge_sorted_lists([], [1, 2, 3])
      [1, 2, 3]
      """
output:     result = []
      i, j = 0, 0
      while i < len(listA) and j < len(listB):
          if listA[i] < listB[j]:
              result.append(listA[i])
              i += 1
          else:
              result.append(listB[j])
              j += 1
      result.extend(listA[i:])
      result.extend(listB[j:])
      return result