Reputation: 21625
I have two lists like
lst1 = ['a', 'b', 'c', 'd', 'e']
lst2 = ['q', 'r', 's']
Now, suppose I generate a mapping from list2 to list1 one like (4, 0, 3) meaning update the 4th element of list1 with the 0th element of list2, update the 0th element of list1 with the 1st element of list2, etc. such that the resulting list looks like
lst1 = ['r', 'b', 'c', 's', 'q']
How can I do this?
Upvotes: 0
Views: 46