title: Hey, I've written a small python program for printing a loading bar but it is not working, Could you guys please look into it
body: <p>So I've written down this very small code of a loading bar, but when I hit run, it's just waiting for sometime like about 10 secs and then it prints out the entire 20 &quot;-&quot; all at once without waiting for 2 secs as it is expected to do, am I doing wrong. Why is it printing 20 &quot;-&quot; all at once without printing it one by one and waiting for 2 secs in between. Please help.</p>
  <p>----Raw code----</p>
  <pre><code>import time
  
  for i in range(20):
    print (&quot;-&quot;, end = &quot;&quot;)
    time.sleep(2)
  </code></pre>
  <p>output:</p>
  <pre><code>
  -------------------
  
  </code></pre>