title: What is wrong with this program? Why did number and totalLength 0?
body: <p>why is it that the number and totalLength still 0? What am I doing wrong. It should have changed due to the for line in lines statement</p>
  
  <pre><code>def cleanedup(s):
      alphabet= 'abcdefghijklmnopqrstuvwxyz'
      cleantext = ''
      for character in s.lower():
          if character in alphabet:
              cleantext += character
      else:
              cleantext = ' '
      return cleantext
  
  import shelve
  
  shelf = shelve.open('books')
  lines = shelf['Pride and Prejudice']
  shelf.close()
  
  number = 0
  totalLength = 0
  
  for line in lines:
      for word in cleanedup(line).split():
          number += 1
          totalLength += len(word)
  
  print(totalLength, number)
  </code></pre>