#updated 02/17/03 using Peter's module #assumptions: dictionary is opened in the mod import speling #check takes in a file and outputs a list of misspelled words misspelledlist = speling.check("input.txt") misspelledlist.sort() misspelleddict = {} for word in misspelledlist: misspelleddict[word] = misspelledlist(word, 0) + 1 #print misspelled words in format -- word (occurances) for key in misspelleddict: print key, print ' (' + str(misspelleddict(key)) + ')'