input: from typing import List
  
  def deleteDuplicates(nums: List[int]) -> List[int]:
      """Delete all duplicates in a given list of numbers.
      >>> deleteDuplicates([1, 2, 2, 3, 4, 4, 5])
      [1, 2, 3, 4, 5]
      >>> deleteDuplicates([5, 5, 5, 5])
      [5]
      """
output:     if not nums:
          return []
      
      result = [nums[0]]
      for num in nums[1:]:
          if num != result[-1]:
              result.append(num)
      
      return result