diff --git a/d.py b/d.py new file mode 100644 index 0000000..a776672 --- /dev/null +++ b/d.py @@ -0,0 +1,13 @@ +a=[] +n= int(input("Enter the number of elements in list:")) +for x in range(0,n): + element=int(input("Enter element" + str(x+1) + ":")) + a.append(element) +b = set() +unique = [] +for x in a: + if x not in b: + unique.append(x) + b.add(x) +print("Non-duplicate items:") +print(unique)