title: computer freezes after running this code
body: <p>Why does my computer freeze when running this code?</p>
  
  <pre><code>import sys
  from scanner import *
  
  def main():
          readTokens("words.txt")
  
  def readTokens(fileName):
          s = Scanner(fileName)
          token = s.readtoken()
          item = []
          while (token != ""):
              item.append(token)
              token = s.readtoken()
          s.close()
          return item
  
  main()
  </code></pre>