We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d2ff87 commit b2124dfCopy full SHA for b2124df
1 file changed
PyBeaner/0004/wc.py
@@ -0,0 +1,11 @@
1
+from collections import Counter
2
+import re
3
+
4
+__author__ = "PyBeaner"
5
6
+with open(r"F:\Program Files\Git\doc\git\html\RelNotes\1.5.0.1.txt") as f:
7
+ word_pat = re.compile("^[A-Za-z]+$")
8
+ file_words = [word for line in f for word in line.split()
9
+ if len(word) > 1 and word_pat.match(word)]
10
11
+print(Counter(file_words))
0 commit comments