Question: Using Python Question 23 7 pts Write a function called reverselookup that takes a list as a parameter. In the function, create an empty dictionary

Using Python
Question 23 7 pts Write a function called reverselookup that takes a list as a parameter. In the function, create an empty dictionary and loop over the list. Loop over the list so that you have access to the indices in the list. If the value from the list is not a key in the dictionary, add the value from the list as a key to the dictionary. Use the current index as the value. (So, if the value is "a" and it is at index 20, the dictionary would end up with a key of "a" and a value of 20.) Return the dictionary after the loop is over. Question 23 7 pts Write a function called reverselookup that takes a list as a parameter. In the function, create an empty dictionary and loop over the list. Loop over the list so that you have access to the indices in the list. If the value from the list is not a key in the dictionary, add the value from the list as a key to the dictionary. Use the current index as the value. (So, if the value is "a" and it is at index 20, the dictionary would end up with a key of "a" and a value of 20.) Return the dictionary after the loop is over
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
