Sorting a Python list by third element, then by first element, etc?
If you go further down the page Mr. White linked to, you'll see how you can specify an arbitrary function to compute your sort key (using the handy cmp_to_key function provided).
Say I have a list in the form [[x,y,z], [x,y,z] etc...] etc where each grouping represents a random point.
I want to order my points by the z coordinate, then within each grouping of z's, sort them by x coordinate. Is this possible?