Question: python Write a function called build_dict that takes a string parameter and a list parameter. Your function should create a dictionary that maps the letter

 python Write a function called build_dict that takes a string parameter

python

Write a function called build_dict that takes a string parameter and a list parameter. Your function should create a dictionary that maps the letter in the string to the corresponding item in the list. You can assume they are both the same length and that there are no duplicate keys. Test case: print(build_dict("ab-cd",[1,1,1,2,3])) Would print out {"a":1, "b":1, "-":1,"c":2,"d":3} Copy and paste the function only here when you have it working in Idle then fix the indention

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!