title: Python: TypeError: float() argument must be a string or a number
body: <p>I need to write a python script for summing decimal numbers in a text file (one line, one number). I wrote this script:</p>
  
  <pre><code>s = float()
  f = open('/home/ale/file_numbers', 'r').readlines()
  N = len(f)-1
  for i in range(0,N):
      s += float(f)
  </code></pre>
  
  <p>but the problem is at the instruction   <code>s += float(f)</code>   infact the error returned is:</p>
  
  <pre><code>TypeError: float() argument must be a string or a number
  </code></pre>
  
  <p>I cannot figure out how to solve such problem
  Any suggestion?</p>