class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
x = 0
y = 1
while y < len(nums):
if nums[x] == nums[y]:
y = y + 1
else:
x = x + 1
nums[x] = nums[y]
y = y + 1
return x + 1