Question: python please Write a function named get_middle_letter_dictionary (sentence) which takes a sentence as a parameter and returns a dictionary where the key is a letter

python please Write a function named get_middle_letter_dictionary (sentence) which takes a sentencepython please

Write a function named get_middle_letter_dictionary (sentence) which takes a sentence as a parameter and returns a dictionary where the key is a letter and the value is a unique list of words that have the key letter as their middle letter. In case the length of a word is even, take the first of the two potential middle letters as the key letter. You can assume that the sentence is not an empty string. You do not need to worry about sorting the list of words in this question. However, you should convert the entire sentence to lower case before processing. For example: Test Result l hello r world sentence = "hello world" abc_dictionary = get_middle_letter_dictionary( sentence) for key in sorted(abc_dictionary.keys()): print(key, ''.join(sorted (abc_dictionary[key]))) sentence = "Summer is over and the hot days are gone" a days abc_dictionary = get_middle_letter_dictionary(sentence) h the for key in sorted(abc_dictionary.keys()): i is print(key, ''.join( sorted (abc_dictionary [key]))) m summer n and o gone hot r are V over

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!