I'm looking to take a list of lists and sort them by an element contained in the contained lists. For clarification, I want to have a list like this code
myList = []
myList.append([1, 2, 3])
myList.append([1, 1, 1])
myList.append([1, 3, 2])
and then sort the elements of list by the last element of each contained list and it would end up looking like this
|
myList = ( v
[1, 2, 3],
[1, 3, 2],
[1, 1, 1])
I also have the numpy library imported in this project. I was looking at argsort for numpy but I don't think you can sort it along an axis of an element