class Solution(object):
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
g=len(nums)
for i in range(0,len(nums)-1):
index=nums[i]
for j in range(0,g-1):
if nums[j]==index:
g=g-1
nums.pop(j)
return g
I am getting error in 13th line
New contributor
Suriya Dharsaun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1