Skip to content

Instantly share code, notes, and snippets.

@itsbth
Created December 15, 2014 01:57
Show Gist options
  • Save itsbth/1e5bddc4c049c2d41da0 to your computer and use it in GitHub Desktop.
Save itsbth/1e5bddc4c049c2d41da0 to your computer and use it in GitHub Desktop.
from sys import stdin
from collections import Counter
from re import findall
words = Counter(findall("(\\w+(?:'\\w+)?)", stdin.read()))
print(words)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment