AD1

Saturday, 28 April 2018

Unique elements

Given a list of numbers, find and print the elements that appear in the list only once
example 
input: 
4 3 5 2 5 1 3 5
output:
1
2
4

from collections import Counter
a = [int(x) for x in input().split()]
c=Counter(a)
for key in c.keys():
if c[key]==1:print(key)