input: def merge_sort(A, B):
   """
   Merge two sorted lists A and B into a single sorted list by comparing the first elements
   of both lists. If the element from A is smaller, it is added to the result and the pointer
   for A moves to the next element. If the element from B is smaller, it is added to the result
   and the pointer for B moves to the next element. Continue until all elements from both lists
   are added to the result.
   >>> merge_sort([3, 6, 8, 10, 11], [2, 5, 7, 12])
   [2, 3, 5, 6, 7, 8, 10, 11, 12]
   """
   result = [] 
   i, j = 0, 0
  
   # Compare elements and add lower one to result
   while i < len(A) and j < len(B):
    if A[i] < B[j]:
     result.append(A[i])
     i += 1
    else:
     result.append(B[j])
     j += 1
  
   # Add remaining elements
   result += A[i:]
   result += B[j:]
  
   return result
output:     result = [] 
      i, j = 0, 0
  
      # Compare elements and add lower one to result
      while i < len(A) and j < len(B):
          if A[i] < B[j]:
              result.append(A[i])
              i += 1
          else:
              result.append(B[j])
              j += 1
  
      # Add remaining elements
      result += A[i:]
      result += B[j:]
  
      return result