input: Write a function to optimize the given Python code to use built-in functions. The function should be able to remove duplicates from an array and return the array without duplicates. If the input array is empty, it should return an empty array.
  assert removeDuplicates([1, 2, 2, 3, 4, 4, 5])==[1, 2, 3, 4, 5]
  assert removeDuplicates([5, 5, 5, 5])==[5]
  assert removeDuplicates([1, 2, 3, 4, 5])==[1, 2, 3, 4, 5]
  assert removeDuplicates([])==[]
  assert removeDuplicates([10, 20, 20, 30, 20, 10])==[10, 20, 30]
output: def removeDuplicates(arr):
      return list(dict.fromkeys(arr))