input: Write a function to optimize the given Python code using built-in functions to remove duplicates from an array. The function should use Python's built-in functionalities to achieve the same result with improved efficiency.
  def removeDuplicates(array): 
      return list(dict.fromkeys(array))
  
  assert removeDuplicates([1, 2, 2, 3, 4, 4, 5]) == [1, 2, 3, 4, 5]
  assert removeDuplicates([1, 1, 1, 1]) == [1]
  assert removeDuplicates([]) == []
  assert removeDuplicates([5, 5, 4, 3, 2, 1, 1]) == [5, 4, 3, 2, 1]
  assert removeDuplicates([10, 20, 30, 20, 10]) == [10, 20, 30]
output: def removeDuplicates(array): 
      return list(dict.fromkeys(array))