Given an unsorted list with N numbers, how would you remove exactly one duplicate from the list?
Implement remove_one_duplicate(nums). Return a new list with the later occurrence of the first repeated value removed during a left-to-right scan. Preserve the order of every other element and assume at least one duplicate exists.
Example: [4, 1, 4, 2] becomes [4, 1, 2]; [7, 7] becomes [7].
def remove_one_duplicate(nums):