class Solution(object):
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if nums==[]:return 0
Len=len(nums)
for i in range(Len-3,-1,-1):
if nums[i]==nums[i+2]:
del nums[i+2]
return len(nums)