Question: 17. Use Python. Suppose d is a dictionary that maps some employee IDs (a subset of the integers from 0 to n1) to salaries. Suppose

17. Use Python. Suppose d is a dictionary that maps some employee IDs (a subset of the integers from 0 to n1) to salaries. Suppose L is an n-element list whose i-th element is the name of employee number i. Your goal is to write a comprehension whose value is a dictionary mapping employee names to salaries. You can assume that employee names are distinct. However, not every employee ID is represented in d. Test your comprehension with the following data:id2salary = {0:1000.0, 3:990, 1:1200.50} names = ['Larry', 'Curly', '', 'Moe']

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!