title: Why print in Python doesn't pause when using sleep in a loop?
body: <p>This code:</p>
  
  <pre><code>import time
  for i in range(10):
      print(i)
      time.sleep(.5)
  </code></pre>
  
  <p>Causes my computer to hang for 5 seconds, and then print out 0-9, as opposed to printing a digit every half second.  Am I doing something wrong?</p>