Question: Write a program that reads in the text file attached, converts all words to lowercase, and prints out all words in the file that begin
Write a program that reads in the text file attached, converts all words to lowercase, and prints out all words in the file that begin with that key letter a, the letter b, and so on. Build a dictionary whose keys are the lowercase letters, and whose values are sets of words which begin with that key letter. After processing the data, print the dictionary to the screen in alphabetical order aligned in two fixed sized columns. Such as: a - {'add', 'alpha', 'at'} b - {'both', 'but', 'box'} Do not add duplicate words to the dictionary.
Step by Step Solution
There are 3 Steps involved in it
First youll need to read the text file and process its content to create the dictionary with words c... View full answer
Get step-by-step solutions from verified subject matter experts
