#Welcome to Spell Check import speling file = open('input.txt') speling.checkPassage(file) #def checkPassage(passageStr) #"""Checks to make sure all the words in the passage are #spelled correctly. #""" #pass #count #assuming mispelled_words is a list returned from the checkPassage function. result={} mispelled_words = mispelled_words.split() for word in mispelled_words: if word in result: result[word] = result.get(word) + 1 else: result[word] = 1 return result