Hacker News new | ask | show | jobs
by sterling312 4720 days ago
meh, just use sum instead of counter

sorted([(i,sum([i==j for j in s.split()])) for i in list(set(s.split()))],key=lambda x:x[1],reverse=True)[:10]