title: The words average from a File
body: <p>I have this questions: Write a program that will calculate the average word length of a text  stored in a file (i.e the sum of all the lengths of the word tokens in the text, divided by the number of word tokens).</p>
  
  <p>my code:</p>
  
  <pre><code>allword = 0
  words = 0
  average = 0
  with open('/home/......', 'r') as f:
      for i in f:
         me =  i.split()
         allword += len(me)
         words += len(i)
         average += allword / float(words) 
  
       print average
  </code></pre>
  
  <p>so , i have 4 line and 55 characters without computer blank space, i come from average:  27.54 .... and i think that the result not gut is...
  Can anybody with simple words tell me,  where are that problem....
  Very Thanks!</p>