Skip to content

Instantly share code, notes, and snippets.

@aavrug
Last active October 26, 2016 10:05
Show Gist options
  • Save aavrug/f8212bc4a22a55486879d8e51e8fdf7f to your computer and use it in GitHub Desktop.
Save aavrug/f8212bc4a22a55486879d8e51e8fdf7f to your computer and use it in GitHub Desktop.
//Previous code
a = list(map(int, raw_input().split()))
for i in a:
if a.count(i) == 1:
print i
break
// Current code
from collections import Counter
a = list(map(int, raw_input().split()))
b = Counter(a)
onlies = [k for k,v in b if v == 1]
print onlies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment