This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to run the program | |
# 1. python code.py | |
import operator | |
import re | |
def print_word_count(filename): | |
regex = re.compile('[^a-zA-Z]') | |
word_count = {} | |
for line in open (filename, "r"): |