input: Write a python function to remove duplicates from a list while preserving order.
  assert remove_duplicates([1, 2, 5, 2, 4, 1]) == [1, 2, 5, 4]
  assert remove_duplicates([10, 20, 10, 30, 20, 40]) == [10, 20, 30, 40]
  assert remove_duplicates([7, 7, 8, 8, 9, 9]) == [7, 8, 9]
output: def remove_duplicates(lst):
      seen = set()
      result = []
      for item in lst:
          if item not in seen:
              seen.add(item)
              result.append(item)
      return result