How can I sort a portion of a list in place?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2272819/python-sort-a-part-of-a-list-in-place">Python: sort a part of a list, in place</a>  </p>
</blockquote>



<p>I want to implement a decision tree algorithm, and my implementation calls for sorting the table in order attribute by attribute, in place. </p>

<p>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. </p>

<p>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? </p>
