input: Write a function to merge two sorted lists.
  assert merging_lists([1, 3, 5], [2, 4, 6]) == [1, 2, 3, 4, 5, 6]
  assert merging_lists([1, 1, 2], [1, 3, 4]) == [1, 1, 1, 2, 3, 4]
  assert merging_lists([5, 10, 15], [3, 8, 20]) == [3, 5, 8, 10, 15, 20]
  assert merging_lists([], [1, 2, 3]) == [1, 2, 3]
  assert merging_lists([7, 8, 9], []) == [7, 8, 9]
output: def merging_lists(list1, list2):
      merged_list = []
      i, j = 0, 0
      while i < list1.length() and j < list2.length():
          if list1[i] < list2[j]:
              merged_list.append(list1[i])
              i += 1
          else:
              merged_list.append(list2[j])
              j += 1
      while i < len(list1):
          merged_list.append(list1[i])
          i += 1
      while j < len(list2):
          merged_list.append(list2[j])
          j += 1
      return merged_list