input: Write a function to remove duplicates from a list while preserving the order of elements. If the given list is empty, return an empty list.
  def remove_duplicates(my_list):
      seen = set()
      result = []
      for item in my_list:
          if item not in seen:
              seen.add(item)
              result.append(item)
      return result
  
  assert remove_duplicates([1, 2, 3, 4, 3, 2, 1])==[1, 2, 3, 4]
  assert remove_duplicates([1, 1, 1, 1])==[1]
  assert remove_duplicates([1, 2, 3, 4])==[1, 2, 3, 4]
  assert remove_duplicates([])==[]
output: def remove_duplicates(my_list):
      seen = set()
      result = []
      for item in my_list:
          if item not in seen:
              seen.add(item)
              result.append(item)
      return result