Questions
Tags
I would like to sort the following list of lists by the fourth element (the integer) in each individual list.
unsorted_list = [['a','b','c','5','d'],['e','f','g','3','h'],['i','j','k','4','m']]
How can I do this? Thank you!
This question is related to python list sorting
python
list
sorting
unsorted_list.sort(key=lambda x: x[3])