input: Write a python function to sort a list of integers using merge sort.
  assert sortList([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == [1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]
  assert sortList([10, 7, 8, 9, 1, 5]) == [1, 5, 7, 8, 9, 10]
  assert sortList([5, 3, 8, 6, 2, 7]) == [2, 3, 5, 6, 7, 8]
  assert sortList([]) == []
  assert sortList([1]) == [1]
output: def sortList(arr):
      if len(arr) <= 1:
          return arr
      
      def merge(left, right):
          result = []
          i = j = 0
          
          while i < len(left) and j < len(right):
              if left[i] < right[j]:
                  result.append(left[i])
                  i += 1
              else:
                  result.append(right[j])
                  j += 1
          
          result.extend(left[i:])
          result.extend(right[j:])
          return result
  
      mid = len(arr) // 2
      left = sortList(arr[:mid])
      right = sortList(arr[mid:])
  
      return merge(left, right)