#------------------------------------------------------------------------------ # ScrabbleTemplate.py #------------------------------------------------------------------------------ def norm(s): """ Returns the norm of a string obtained by alphabetizing its characters. """ # end norm() def AnagramDictionary(f): """ Returns a dictionary whose keys are the norms of the words in file f, and whose values are lists of words with a given norm. Thus each list contains a group of words in f that are anagrams of each other. """ # end AnagramDictionary() def printWordList(L): """Prints the words in L on a single line, separated by commas.""" # end printWordList() # main() ---------------------------------------------------------------------- def main(): # open a word file, assemble the dictionary using words, close file # get input from user, and query the dictionary # get a string from the user # look up string in the dictionary, print its anagrams if they exist # end main() ------------------------------------------------------------------ # ----------------------------------------------------------------------------- if(__name__=='__main__'): main() # end if ----------------------------------------------------------------------