I have a List of int-Lists:
myListA = {1, 3, 7}
myListB = {2, 5, 1}
myListC = {6, 4, 5}
myListOfLists = { myListA, myListB, myListC }
Is there any way of sorting myListOfLists by the value at a certain index of the different Lists.
What i’m trying to get, is:
myListOfLists = {myListB, myListC, myListA} (sorted by the last int in every List).
Any ideas how to achieve that? It would be no problem to switch to built-in arrays or something like that, if it would be helpflul. If it is not possible to achieve what i described, it would even be helfpul if the List of Lists could be sorted by the sum of its int-values.
Thanks in advance.