Question: Define a function named create_baby_names_dictionary (names_list) which takes a list of baby names as a parameter, and creates a dictionary by looping through each element

 Define a function named create_baby_names_dictionary (names_list) which takes a list ofbaby names as a parameter, and creates a dictionary by looping through

Define a function named create_baby_names_dictionary (names_list) which takes a list of baby names as a parameter, and creates a dictionary by looping through each element in the list and creating a corresponding key:value item. The "key" of each item in the dictionary is the first letter of the baby name, and the "value" is a list of baby names that start with that letter (e.g. key of "A", value of ['Alex', 'Anthony', 'Asher'] ). Notes - You can assume that the parameter list contains multiple names. - The list of values should be sorted into standard alphabetical order as shown in the examples below. Result A ['Alex', 'Anthony', 'Asher'] B ['Benjamin', 'Bob'] C ['Connor'] D ['Daniel']

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!