```
class Solution:
'''
@param integer[] nums
@return integer
'''
def removeDuplicates(self, nums):
i = 0
while i < (len(nums) - 1):
if nums[i] is nums[i+1]:
del nums[i]
else:
i += 1
return len(nums)
```

In local, my code worked. Why got an Output Limit Exceeded Error in OJ? I am so confused! Need some help T_T.