The full question, and I'm starting to learn python online but having issue with this question marked as easy
Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
class Solution(object):
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
k=0
for i in range(i+1,len(nums)-1):
j=i+1
for j in range(j+1,len(len(nums))):
if nums[i] == nums[j]:
del nums[j]
len_list = nums
return(len_list, nums)