title: Python classes no attribute error
body: <p>I wrote this class:</p>
  
  <pre><code>class Bmi(object):
  
      def __init__(self,regel):
          self.persoon = regel
          self.lengte = []
          self.gewicht =[]
  
      def parse_input(self,regels):        
          for regel in regels:
              lengte = regel.split('\t')[2]
              gewicht = regel.split('\t')[3]
          self.lengte = lengte
          self.gewicht = gewicht
          return self.lengte, self.gewicht
  </code></pre>
  
  <p>I want to use it to parse input that looks like this, to get the length and weight of each person:</p>
  
  <pre><code>Dean Johnson    M   1.78    83
  Sophia Miller   V   1.69    60
  </code></pre>
  
  <p>My program looks like this:</p>
  
  <pre><code>from ipy_lib import file_input
  from BMI import Bmi
  
  bestand = file_input()
  for i in bestand:
      Bmi(i)
      i.parse_input()   
  </code></pre>
  
  <p>I get AttributeError: 'str' object has no attribute 'parse_input'. 
  What goes wrong here and what does the error mean? </p>