title: Get the object with the max attribute's value in a list of objects
body: <p>This is the code I written so far, and the point with the program is to read 20 people from a file and then assign them their attributes, then normalise their values from a input given by the user.</p>
  
  <pre><code>class One:
      def __init__(self):
          self.attrOne = ()
          self.attrTwo = ()
          self.attrThree = ()
          self.attrFour = ()
          self.attrFive= ()
          self.attrSix = ()
          self.attrSeven = ()
          self.attrEight = ()
          self.attrNine = ()
  
  
  class Two:
  
      def __init__(self):
          self.allPersons = []
  
     def importFromList(self, filename): 
         file= open(filename, "rU")
         for line in file:
             partOfList = line.split()                        
             x = Partner() 
             x.attrOne = partOfList[0]
             x.attrTwo = partOfList[1]
             x.attrThree = partOfList[2]
             x.attrFour = partOfList[3]
             x.attrFive = partOfList[4]
             x.attrSix = partOfList[5]
             x.attrSeven = partOfList[6]
             x.attrEight= partOfList[7]
             x.attrNine = partOfList[8]
             self.addPerson(x)
          file.close()
  
  def addPerson(self, x):
      self.allPersons.append(x) 
  </code></pre>
  
  <p>What I wonder is how to loop through the attributes of the persons that is placed in allPersons list and then compare them against eachother to find out the max value. This is what I tried so far, but I can't get it to work </p>
  
  <pre><code>def getMaxValue(self): 
      o = One()
      for eachPartner in self.allPartners:
          maxValuesAttrOne = max(O.attrOne))
  </code></pre>
  
  <p>All help will be appreciated, and I'm open for new solutions, also I imagine the importFromList method is not the most effective one, so if you got any objections I'm willing to listen and learn!</p>