title: Replace console output in Python
body: <p>I'm wondering how I could create one of those nifty console counters in Python as in certain C/C++-programs.</p>
  
  <p>I've got a loop doing things and the current output is along the lines of:</p>
  
  <pre><code>Doing thing 0
  Doing thing 1
  Doing thing 2
  ...
  </code></pre>
  
  <p>what would be neater would be to just have the last line update;</p>
  
  <pre><code>X things done.
  </code></pre>
  
  <p>I've seen this in a number of console programs and am wondering if/how I'd do this in Python.</p>