Tidy up, make line numbers consistent with text

This commit is contained in:
Crista Lopes
2019-12-22 17:43:07 -08:00
parent ebeba3d34c
commit 6e1d72bd21
26 changed files with 30 additions and 32 deletions

View File

@@ -3,4 +3,4 @@ import heapq, re, sys
words = re.findall("[a-z]{2,}", open(sys.argv[1]).read().lower())
for w in heapq.nlargest(25, set(words) - set(open("../stop_words.txt").read().split(",")), words.count):
print(w, "-", words.count(w))
print(w, '-', words.count(w))