title: Print statement just before calling a function with a tqdm progress bar results in the print statement being printed after tddm
body: <p>When working with tqdm for a project, I've noticed that when I use a print statement just before I call a function that has a tqdm progress bar, the print statement is printed somewhere in between the progress bars.</p>
  <p>I've noticed that this behaviour only occurs in ipython notebooks, not when run in terminal.</p>
  <p><img src="https://i.stack.imgur.com/sh4nR.png" alt="example output in ipython" /></p>
  <p><img src="https://i.stack.imgur.com/AbwIH.png" alt="example output in terminal" /></p>
  <pre class="lang-py prettyprint-override"><code>from tqdm import tqdm
  
  def long_progress():
      for _ in tqdm(range(100)):
          time.sleep(.05)
  
  for i in range(5):
      print(&quot;Show parameters of the progress&quot;)
      long_progress()
  
  </code></pre>
  <p>This behaviour doesn't break anything, I'm just really curious why it is happening.</p>
  <p>I've also noticed that when I use <code>time.sleep(0.2)</code> before I call tqdm it's resolved, so it seems like some timing issue.</p>
  <p>Edit:
  Changed print statement to reflect my goal more precisely</p>