title: Sort dictionary with Objects as keys
body: <p>I'm pretty new to python and I'm trying to sort a dict which has some objects as keys. </p>
  
  <p>I have a class <code>Student(studID, name)</code> which is the key of the dict and an array of grades that is the value of the dict.</p>
  
  <p>This is what it looks like:</p>
  
  <pre><code>dictEx = {
     Student: [5,6],
     Student: [7,8],
     Student: [10,9]
  }
  </code></pre>
  
  <p>That object Student has a method getName() to get the student name. What I'm trying to accomplish is to sort this dictionary first by the student name and then by the grades only if the students have the same name. (if I have two students named Andrew for example)</p>