def alice_word_list ( ): from list_words_in_file import list_words_in_file from word_frequency import word_frequency filename = 'alice_in_wonderland.txt' # # Read the file, store the words in a list. # words = list_words_in_file ( filename ) print ( '' ) print ( ' First 30 words in list:' ) print ( '' ) print ( words[0:30] ) # # Count the frequency of words, make a (word:count) dictionary. # counts = word_frequency ( words ) print ( '' ) print ( ' Dictionary of (word:count):' ) print ( '' ) print ( counts ) if ( __name__ == "__main__" ): alice_word_list ( )