# # Torbert, 8.20.2008 # # Spell-checker, Version 1.3 # # Input: dictionary of six-letter words and a string entered by the user # Process: determine if the user's string is a word in the dictionary # Output: indicate YES or NO # def read_words(fname): infile=open(fname) temp=infile.read() infile.close() return temp.split('\n')[:-1] def main(): wlist=read_words('words.txt') ustr=raw_input('String: ') k=0 while k