title: Can't split multi-line string into an array of rows
body: <p>I'm very new to Python and just ran into a problem.</p>
  
  <p>I tried many solutions suggested (mostly from <a href="https://stackoverflow.com/questions/172439/how-do-i-split-a-multi-line-string-into-multiple-lines">this</a> question) on making every line of a .txt document into an array object. I tried using just <code>split()</code>, <code>split("\n")</code> and <code>splitlines()</code>, but none of them work. Every line in the text document is a number and it will do some calculations on it. For example the first line is <strong>50</strong>, but it does the first calculation on the number <strong>5</strong>, second one on the number <strong>0</strong> and on the next one it throws an error about being unable to convert it into a float (<em>ValueError: could not convert string to float</em>), probably cause it tried to convert <strong>\n</strong> or something.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>def weightTest(f, minWeight, fti):
      weights = []
      f_content = open(f, encoding='UTF-8')
      for row in f_content:
          length = row.splitlines()
          for length in row:
              weight = float(length) ** 3 * fti / 100 # ValueError
              if weight &lt; minWeight:
                  print("Smaller than the minimum weight.")
              else:
                  print("The weight is " + str(weight) + " grams.")
                  weights.append(weight)
      print("The biggest weight: " + str(max(weights)) + " kg")
      f_content.close()
  f = input("Insert file name: ")
  alam = float(input("Insert minimum weight: "))
  fti = float(input("Insert FTI: "))
  weightTest(f, alam, fti)
  </code></pre>
  
  <p>Here is the text used (instead of spaces, there's new lines, StackOverflow doesn't want to show them somewhy):
  50
  70
  75
  55
  54
  80</p>
  
  <p>Here is the log:</p>
  
  <pre><code>Insert file name: kalakaalud.txt
  Insert minimum weight: 50
  Insert FTI: 0.19
  Smaller than the minimum weight.
  Smaller than the minimum weight.
  Traceback (most recent call last):
    File "C:\File\Location\kalakaal.py", line 18, in &lt;module&gt;
      weightTest(f, minWeight, fti)
    File "C:\File\Location\kalakaal.py", line 7, in weightTest
      weight = float(length) ** 3 * fti / 100
  ValueError: could not convert string to float: 
  </code></pre>