input: Write a function to optimize the provided Python code that removes duplicate elements from a list using built-in functions. If the input list is empty, return an empty list.
  assert removeDuplicates([1, 2, 2, 3, 4, 4, 5])==[1, 2, 3, 4, 5]
  assert removeDuplicates([10, 20, 30, 20, 40])==[10, 20, 30, 40]
  assert removeDuplicates([5, 5, 5, 5, 5])==[5]
  assert removeDuplicates([])==[]
  assert removeDuplicates([1, 1, 2, 2, 3, 3, 4, 4, 5, 5])==[1, 2, 3, 4, 5]
output: def removeDuplicates(lst):
      return list(dict.fromkeys(lst))