I have a list as follows:
[['a', 123], ['b', 456], ['c', 789]]
and the string cba
I would like to sort the list based on the first item and the order in which the string cba is in:
[['c', 789], ['b', 456], ['a', 123]]
What would be the best way to go about this?
tuplebca, you'd want[['b', 456], ['c', 789], ['a', 123]], right?