input: Write a function that removes duplicates from a given list and returns the updated list. The order of elements should be preserved.
  
  def remove_duplicates(my_list):
      return list(dict.fromkeys(my_list))
  
  assert remove_duplicates([1, 2, 3, 4, 3, 2, 1]) == [1, 2, 3, 4]
  assert remove_duplicates([3, 5, 7, 3, 3, 7]) == [3, 5, 7]
  assert remove_duplicates([2, 2, 2, 2]) == [2]
  assert remove_duplicates([]) == []
output: def remove_duplicates(my_list):
      return list(dict.fromkeys(my_list))