Adding string before sys.stdout.write in python
<p>How do i add string or text before sys.stdout.write.</p>

<pre><code>for i in range(101):
        time.sleep(0.60)
        sys.stdout.write("\r%d%%" % i)
        sys.stdout.flush()
</code></pre>

<p>The above code prints only percentage like this :
 50%</p>

<p>I want to add text before percentage which should be in a single line like below:</p>

<p>PERCENTAGE COMPLETED : 50%</p>

<p>Please help me.</p>