title: Find maximum value of specific variable among an array of Objects
body: <p>I am new to python. I have an object called Student with variables student_id and grade. In the main class, I can set the values of student_id and grade. There's also an array in the main class called Classroom where I can store an instance of Student. I placed 4 instances of Student with different values of student_id and grade. 
  Now, I want to return the value of student_id with the greatest grade. </p>
  
  <p>I tried sorting the array Classroom using the code below. </p>
  
  <pre><code>Classroom.sort(key=lambda y: y.grades, reverse=True)
  </code></pre>
  
  <p>The object with the greatest grade is in the first element and lowest grade at the last element. With this, I can just return the first element always, but I don't want to rearrange the array.</p>
  
  <p>I am also thinking of using max() but I don't think it works with objects. Any idea on how to do it?</p>