using String.startswith() with a unicode string <p>I am trying to trim a string scraped from an HTML page using BeautifulSoup. It starts with </p> <pre><code>&amp;#160;–&amp;#160; </code></pre> <p>in the html page. I am trying the following code:</p> <pre><code>if thestring.startswith(unichr(160) + '-' + unichr(160)): print "found starting sequence" thestring= thestring[3:] </code></pre> <p>However, I the <code>if</code> condition is not being triggered (as confirmed by the fact that my print statement is not happening). How do I set up that condition?</p> <p>(Also in some cases, thestring is initially only those 3 characters, in which case I want thestring to end up as the empty string -- will this do it or will I need to separately test for that case?)</p>