Basic Search and Replace in Python isn't Executing
<p>I'm trying to code up something in Python, that will simply remove any HTML tags from a string input. But for some reason, the code won't execute (simply hangs) on my home Python install, and gets killed on the Udacity interface. </p>

<p>Where am I going wrong?</p>

<pre><code>def remove_tags(sentence):
    list = []
    state = 0
    while state == 0:
        location1 = sentence.find('&lt;')
        location2 = sentence.find('&gt;',location1)
        if location1 != -1:
            chamber = sentence[location1:location2+1]
            sentence.replace(chamber,'')
        elif location1 == -1:
            state = 1
            return sentence.split()
    return sentence.split()

print remove_tags('''&lt;table cellpadding='3'&gt;
                     &lt;tr&gt;&lt;td&gt;Hello&lt;/td&gt;&lt;td&gt;World!&lt;/td&gt;&lt;/tr&gt;
                     &lt;/table&gt;''')
</code></pre>
