I want to sort column values depending on a row full of int:
cart = [[1, 3, 0, 2], ['olives', 'tomatoes', 'avocado', 'patato']]
and have this
new_cart= [[0, 1, 2, 3], ['avocado', 'olives', 'patato', 'tomatoes' ]]
In other words I want strings to sorted by the integers values which they corresponds:
I found these questions but non of them does what I want: