a = [[1,3,45,6,78,9],[2,6,5,88,3,4],[44,66,2,4,77,12]]
b = [4,6,3]
These are two lists in python, now each element in the first list a corresponds to the element in the list b with the same index. i.e a[0]:4,a[1]:6,a[2]:3 and so on.
Now I want to sort list b and then print the respective values corresponding to list a.
I cannot use a dictionary because it gives an error that a is not hashable.
My desired output is:
x = [[44,66,2,4,77,12], [1,3,45,6,78,9], [2,6,5,88,3,4]]