title: string parsing in python
body: <p>I want to parse a string in python. Example string is four numeric values separated by white spaces. I want to parse and turn into them floating point values. The code I'm dealing is below. When I debug the code. It never enters into the else block? what's the missing point?</p>
  
  <pre><code>def stringToQuaternion(self, str):
          s = ''
          list = []
          for i in range (0, len(str)):
              if ( str[i] != string.whitespace ):
                  s += str[i]
              else:
                  list.append(float(s))
                  s = ''
          return Quadro(list[0], list[1], list[2], list[3])
  </code></pre>