python: how to overwrite the previous print to stdout
<p>if I had the following code;</p>

<pre><code> for x in range(10):
     print x
</code></pre>

<p>I would get the output of</p>

<pre><code>1
2
etc..
</code></pre>

<p>What I would like to do is instead of printing a newline, I want replace the previous value and overwrite it with the new value on the same line.</p>
