How to convert a string "-2" into float in python?
<pre><code>&gt;&gt;&gt; a=("-2","-2")
&gt;&gt;&gt; float(a[0][0])
</code></pre>

<p>This gives me an error </p>

<pre><code>ValueError: invalid literal for float(): -
</code></pre>

<p>So how do I convert it ? </p>
