✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Write a Python program that reads a text file. The program should:
Extract all words and convert them to lowercase.
Store the words in a list.
Use a dictionary to group the words by their first letter.
Print the letter(s) and the associated words that correspond to the largest number of words.
Example of the text file:
Artificial intelligence and algorithms are advancing quickly.Analytics and automation are at the heart of digital transformation.Deep learning, data, and design drive development.
Example of code execution:
Enter the filename: quiz2.txtThe letter(s) that correspond to the largest number of words (11): a: analytics, advancing, at, are, and, artificial, algorithms, automationGet Unlimited Answers To Exam Questions - Install Crowdly Extension Now!