import reimport sysimport collections c = collections.Counter(re.findall(r'[^\-.,\s;:?!]+', sys.stdin.read()))print(*(w for w in sorted(c)))print(*(w for w in sorted(c, key=c.__getitem__)))
yo - what, you;; do you say what!
do say what yo you do say yo what you
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!