Python print, string formatting
<p>If I have a variable and want to use the string formatting, I would use:</p>

<pre><code>print 'r_0 =%02f ' %(variable1)
</code></pre>

<p>which works fine. However I would like to use "math mode" inside <code>print</code>. 
i.e.</p>

<pre><code>print r'$r_{0}=%02f \pm %02f$' %(variable1,variable2) 
</code></pre>

<p>The above doesn't seem to work. It just prints the values of <code>variable1</code> and <code>variable2</code> correctly, but it doesn't print <code>r_0</code> and <code>\pm</code> as it should. i.e. it prints </p>

<pre><code>$r_{0}=18.966 \pm 0.424698$
</code></pre>

<p><strong>My question is, how to make the subscript <code>(r_{0})</code> and <code>\pm</code> work!</strong></p>