Kevin, I'm pretty new to Python too. I'm not sure why you're seeing this problem... is it possible that this is an "out-by-one" error? Is zymotechnics the *last* word in dictionary.txt? Try this slightly simplified version of your program and see if you have the same problem....
def sort_string(word): '''Returns word in lowercase sorted alphabetically''' return "".join(sorted(list(word.lower()))) dictionary = {} f = open('/usr/bin/words') # or whatever file you like for line in f: sline = sort_string(line[:-1]) if sline in dictionary: dictionary[sline].append(line) else: dictionary[sline] = [line] f.close() lookup = raw_input('Enter a scrambled word : ') while lookup: try: results = dictionary[sort_string(lookup)] for x in results: print x, print except: print "?????" lookup = raw_input('Enter a scrambled word : ') Good luck, Nick. -- http://mail.python.org/mailman/listinfo/python-list