From 606ea31bd551363f39a0e2992e48153498a58186 Mon Sep 17 00:00:00 2001 From: mihirapappu <44111392+mihirapappu@users.noreply.github.com> Date: Sat, 13 Oct 2018 17:03:04 +0530 Subject: [PATCH] Add files via upload --- d.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 d.py 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)