input: Write a function to optimize the given Python code for removing duplicates from an array using built-in functions. The function should take an array as input and return a new array with all duplicates removed. If the input array is empty, the function should return an empty array.
  assert removeDuplicates([1, 2, 2, 3, 4, 4, 5])==[1, 2, 3, 4, 5]
  assert removeDuplicates(['a', 'b', 'a', 'c', 'b'])==['a', 'b', 'c']
  assert removeDuplicates([10, 10, 10, 10])==[10]
  assert removeDuplicates([])==[]
  assert removeDuplicates([1])==[1]
output: def removeDuplicates(arr):
      return list(dict.fromkeys(arr))