I've been trying to solve this problem many ways now, and am really just not familiar enough with the language to see an elegant solution. I have a dictionary, where each value is itself a list of lists. For example:
keyA:([x1,y1,z1], [x2,y2,z2] etc...)
Within a key, I would like to sort these lists based on one value. For example, in keyA, I want to sort the entries by value 'y'. Therefore, keyA would still contain the same lists, but they would be arranged numerically from smallest to greatest based on the value of y1, y2 etc... The Y entires are always going to be integers and the sorting should be numerical.
The reason that I am doing this is I have a data file with entries:
NameA: x, y, z
NameA: x2, y2, z2
NameA: x3, y3, z3
NameB: x, y, z etc...
I am trying to sort the data within a set of 'Names'. The dictionary seemed an obvious choice, but I'm amenable to all other options.