Possible Duplicate:
Python: sort a part of a list, in place
I want to implement a decision tree algorithm, and my implementation calls for sorting the table in order attribute by attribute, in place.
Here is the gist of it: choose an attribute, sort over it. All entries in the table that share that attribute can now be thought of as another list, because permuting within them does not modify that attribute.
So then, how can I sort just that relevant subportion? Do I need to write my own wrapper around the list with a specified base and length?