Improvement in codes


Hi everybody,
Can anyone of you provide me better code

def remove_duplicates(k):
    if k == []:
        return []
    new = []
    for d in range(len(k) - 1):
        for m in range(len(new)):
            if k[d + 1] == new[m]:
            new.append(k[d + 1])
    return new


look at the hint in the exercise, it tells you you can use not in, this way, you need only one loop, and can hugely reduce your code base


thanks @stetim94
I forgot to look there before asking on the forum


f you need more help, let me know