Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started