title: how to do hierarchical sorting in python?
body: <p>So I have a 2D array of data taken from an excel spreadsheet which I'm currently sorting based on a column with data on criticality.  </p>
  
  <pre><code>#rows contains my data that I'm sorting, it's a 2D array
  searchdict = dict(Critical=1, High=2, Medium=3, Low=4)
  rows.sort(key=lambda row: searchdict.get(row[11], 5))
  </code></pre>
  
  <p>I'd like to sort based on another column if it's a tie for that column, anyone know how to approach this?  Thanks in advance for any help.</p>
  
  <p>FYI: the other column contains numerical data</p>