#try to avoid input function a = [11,22,33,44,55,11,11,33,44,22,33,44,55,66,22,55] b = [] for i in a: if i not in b: b.append(i) a.remove(i) a,b = b,a print("New Duplicate list :",b,"list is :",a)
Click the run button. Try to avoid input() function.