Skip to content

Instantly share code, notes, and snippets.

@tera3939
Created December 8, 2017 03:31
Show Gist options
  • Save tera3939/629615d22a549c11335b50384b04b1c8 to your computer and use it in GitHub Desktop.
Save tera3939/629615d22a549c11335b50384b04b1c8 to your computer and use it in GitHub Desktop.
https://paiza.jp/learning/word-count を一行でウェイってする奴
[print(*t) for terms, used in zip([input().split()], [set()]) for t in map(lambda x: (x, terms.count(x)), terms) if t not in used and (used.add(t) or True)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment