<qiyuangong>026_Remove_Duplicates_from_Sorted_Array_1.py
def removeDuplicates( nums):
    ls = len(nums)
    if ls <= 1:
        return ls
    last = nums[0]
    pos = 1
    for t in nums[1:]:
        if t == last:
            continue
        else:
            nums[pos] = t
            pos += 1
            last = t
    return pos
def sample_funcname ( var_0 ) :
    var_2 = len ( var_0 )
    if var_2 <= 1 :
        return var_2
    var_5 = var_0 [ 0 ]
    var_6 = 1
    for var_7 in var_0 [ 1 : ] :
        if var_7 == var_5 :
            continue
        else :
            var_0 [ var_6 ] = var_7
            var_6 += 1
            var_5 = var_7
    return var_6
