print the top three words in fileName found in the file usin
#print the top three words in fileName found in the file using a dictionary
#Formatted as such:
#The top three words in fileName are:
#word : number
#word : number
#word : number
def top_three_by_count(fileName):
Solution
To get the top three words in a file we need to add this code line.
from collections import Counter
def top_three_by_count(fileName):
Counter(read_dictionary(fileName)).most_common(3)]
