Question: Write a function called lists to dict(l1, l2) that takes two lists of unique integers of equal length as arguments and creates a dictionary where

Write a function called lists to dict(l1, l2) that takes two lists of unique integers of equal length as arguments and creates a dictionary where the keys are the elements of the first list and the values are the elements in the corresponding indices in the second list. For example, if l1 = [4,-3, 3, 1] and l2 = [5, 8, 20, 9], the function should return {4 : 5, {-3: 8, 3 : 20, 1 : 9} You should not use the zip() function to solve this problem. Instead, use a loop

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 Accounting Questions!