#!/usr/bin/env python

import collections
import string
import sys


words = collections.defaultdict(int)
strip = string.whitespace + string.punctuation + string.digits + "\"'"
for filename in sys.argv[1:]:
    for line in open(filename):
        for word in line.lower().split():
            word = word.strip(strip)
            if len(word) > 2:
                words[word] += 1

new_words = collections.defaultdict(set)
for key, value in words.items():
    new_words[value].add(key)

for num in sorted(new_words, reverse=True):
    for word in sorted(new_words[num]):
        print("'{0}' occurs {1} times".format(word, num))

ef911b45524bef91705335d4cb93b8e381567c68
<mask token>

<mask token>
for filename in sys.argv[1:]:
    for line in open(filename):
        for word in line.lower().split():
            word = word.strip(strip)
            if len(word) > 2:
                words[word] += 1
<mask token>
for key, value in words.items():
    new_words[value].add(key)
for num in sorted(new_words, reverse=True):
    for word in sorted(new_words[num]):
        print("'{0}' occurs {1} times".format(word, num))

<mask token>
words = collections.defaultdict(int)
strip = string.whitespace + string.punctuation + string.digits + '"\''
for filename in sys.argv[1:]:
    for line in open(filename):
        for word in line.lower().split():
            word = word.strip(strip)
            if len(word) > 2:
                words[word] += 1
new_words = collections.defaultdict(set)
for key, value in words.items():
    new_words[value].add(key)
for num in sorted(new_words, reverse=True):
    for word in sorted(new_words[num]):
        print("'{0}' occurs {1} times".format(word, num))

import collections
import string
import sys
words = collections.defaultdict(int)
strip = string.whitespace + string.punctuation + string.digits + '"\''
for filename in sys.argv[1:]:
    for line in open(filename):
        for word in line.lower().split():
            word = word.strip(strip)
            if len(word) > 2:
                words[word] += 1
new_words = collections.defaultdict(set)
for key, value in words.items():
    new_words[value].add(key)
for num in sorted(new_words, reverse=True):
    for word in sorted(new_words[num]):
        print("'{0}' occurs {1} times".format(word, num))

#!/usr/bin/env python

import collections
import string
import sys


words = collections.defaultdict(int)
strip = string.whitespace + string.punctuation + string.digits + "\"'"
for filename in sys.argv[1:]:
    for line in open(filename):
        for word in line.lower().split():
            word = word.strip(strip)
            if len(word) > 2:
                words[word] += 1

new_words = collections.defaultdict(set)
for key, value in words.items():
    new_words[value].add(key)

for num in sorted(new_words, reverse=True):
    for word in sorted(new_words[num]):
        print("'{0}' occurs {1} times".format(word, num))
