input: Write a function to partition an array around a pivot.
  assert partition([1, 9, 0, 5, 2]) == [1, 0, 2, 5, 9]
  assert partition([5, 3, 8, 4, 2]) == [3, 2, 4, 8, 5]
  assert partition([10, 7, 3, 6, 2]) == [7, 3, 6, 2, 10]
output: def partition(arr):
      if not arr:
          return []
      
      pivot = arr[0]
      left = [x for x in arr[1:] if x <= pivot]
      right = [x for x in arr[1:] if x > pivot]
      
      return left + [pivot] + right