title: Python: Another way to sort without using built-in sort function?
body: <p>We represent a person using a <code>tuple(&lt;gender&gt;, &lt;age&gt;)</code>. Given a list of people, write a function sort_age that sorts the people and return a list in an order such that the older people are at the front of the list. An example of the list of people is <code>[("M", 23), ("F", 19), ("M", 30)]</code>. The sorted list would look like <code>[("M", 30), ("M", 23), ("F", 19)]</code>.</p>
  
  <p>My approach:</p>
  
  <pre><code>def sort_age(lst):
     lst.sort(key=lambda x: (x[1],x[0]),reverse=True)
     return lst
  </code></pre>
  
  <p>Is there another way to do this without using .sort?</p>