In [4]:
xs = [10,20,10,30,10]

def rmdups1(xs):
    new_xs = []
    for x in xs:
        if x not in new_xs:
            new_xs.append(x)
    return new_xs

def rmdups(xs):
    i = 0
    j = i+1
    while i < len(xs):
        if xs[i] == xs[j]:
            del xs[j]
        else:
            i += 1
            j = i + 1
    
xs = rmdups1(xs)
print(xs)
[10, 20, 30]
In [ ]: