input: Write a python function to sort a list of numbers using a generic sorting algorithm.
  assert sort([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == [1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]
  assert sort([10, 7, 3, 2, 1, 9, 5]) == [1, 2, 3, 5, 7, 9, 10]
  assert sort([]) == []
  assert sort([1]) == [1]
output: def sort(arr):
      if len(arr) <= 1:
          return arr
      pivot = arr[len(arr) // 2]
      left = [x for x in arr if x < pivot]
      middle = [x for x in arr if x == pivot]
      right = [x for x in arr if x > pivot]
      return sort(left) + middle + sort(right)