Stripping chars in python
<p>I know this is not very pretty code and that I'm sure there is an easier way but I'm more concerned on why python is not stripping the characters I requested it to.</p>

<pre><code>import urllib, sgmllib


zip_code = raw_input('Give me a zip code&gt; ')
url = 'http://www.uszip.com/zip/' + zip_code
print url

conn = urllib.urlopen('http://www.uszip.com/zip/' + zip_code)

i = 0
while i &lt; 1000:
    for line in conn.fp:
            if i == 1:
                print line[7:-10]
                i += 1
            elif i == 344:
                line1 = line.strip()
                line2 = line1.strip('&lt;td&gt;') #its not stripping the characters 
                print line2[17:-60]
                i += 1
            else:
            i += 1
</code></pre>
