title: How to get list of every instance of variable from class?
body: <p>I am trying to find a way to get a list of all instances of the <code>self.average</code> variable from the <code>Basketball</code> class. I will then do <code>max(list)</code> to get the maximum value.</p>
  
  <pre><code>class Basketball:
      def __init__(self, name, goals, shots):
          self.name = name
          self.goals = goals
          self.shots = shots
          self.average = shots / goals
  
      def display_average(self):
          """
          &gt;&gt;&gt; b1 = Basketball("Karen", 20, 80)
          &gt;&gt;&gt; b1.display_average()
          'Player: Karen, average goals per game: 4'
          """
          returnString = f"Player: {self.name}, average goals per game: {self.average:.2f}"
          return returnString
  
  if __name__ == "__main__":
      player1 = Basketball("Karen", 20, 80)
      print(player1.display_average())
      player2 = Basketball("Alex", 4, 19)
      print(player2.display_average())
  </code></pre>