How can I sort one list by values from another list?
Merge them into a single list of tuples, sort the resulting list, and then pick out the element you want.
>>> list1 = ["what", "I'm", "sorting", "by"] >>> list2
Merge them into a single list of tuples, sort the resulting list, and then pick out the element you want.
>>> list1 = ["what", "I'm", "sorting", "by"] >>> list2