title: Python - How to read HTML line by line
body: <p>I am trying to write a program that will take an HTML file and output each line. I am doing something wrong because my code is outputting each letter. How can I get all the HTML lines into a list?</p>
  
  <p>This is the code so far:</p>
  
  <pre><code>f = open("/home/tony/Downloads/page1/test.html", "r")
  htmltext = f.read()
  f.close()
  
  for t in htmltext:
      print t + "\n"
  </code></pre>