Python split string on +- character
<p>I have the following string "158.8 ± 0.7" that gets pulled from someone else's html via beautifulsoup. I would like to split it into the number and error values as floats. I can't get the split function to split on the ± character though.</p>

<p>I've tried:</p>

<pre><code>num, err = "158.8 ± 0.7".split('±')
num, err = "158.8 ± 0.7".split(u'U+00B1')
num, err = "158.8 ± 0.7".split('&amp;plusmn;')
</code></pre>

<p>None of these work though. Any ideas?</p>

<p>I'm using Python 2.7</p>

<p><strong>Update</strong></p>

<p>I added <code># -*- coding: utf-8 -*-</code> as the first line of my code and now I get the error <code>UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1: ordinal not in range(128)</code>. Any further advice?</p>