input: Write a function to delete all duplicates in a given list of numbers. Return a new list with all unique elements in the same order as they appear in the input list. If the input list is empty, return an empty list.
  assert deleteDuplicates([1, 2, 3, 2, 1])==[1, 2, 3]
  assert deleteDuplicates([4, 5, 4, 4, 5, 6])==[4, 5, 6]
  assert deleteDuplicates([7, 7, 7, 7])==[7]
  assert deleteDuplicates([])==[]
output: def deleteDuplicates(nums):
      seen = set()
      result = []
      for num in nums:
          if num not in seen:
              seen.add(num)
              result.append(num)
      return result