Python: Problems finding string in website source code
<p>I open a website with urlopen. I then put the website sourcecode into a variable like so</p>

<pre><code>source = website.read()
</code></pre>

<p>When I just print the source it comes out formatted correctly, however when I try to iterate through each line each character is it's own line.</p>

<p>for example</p>

<p>when I just print it looks like this</p>

<pre><code>&lt;HTML&gt; title&lt;/html&gt;
</code></pre>

<p>When I do this </p>

<pre><code>for line in source:
      print line
</code></pre>

<p>it looks like this</p>

<pre><code>&lt;
H
T
M
L
... etc
</code></pre>

<p>I need to find a string that starts with "var" and then print that entire line.</p>
