Question: Write a function named initialD that takes in a parameter called text, a string containing words, and returns a new dictionary where each key is

 Write a function named initialD that takes in a parameter called

Write a function named initialD that takes in a parameter called text, a string containing words, and returns a new dictionary where each key is the first letter of a word in text and the corresponding value is a list containing each word beginning with that letter (duplicates allowed). Upper and lower case letters are considered different from each other. def initialoi d= I) for word in initial = If Initial not in d: d) initia1]= else: at initial l.append (word) return

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!