title: print() & matplitlib.pyplot.imshow() not synced in 'for' loop in jupyter notebook
body: <p>I am trying to print a text corresponding each image n jupyter notebook cell. Below is a dummy code block:</p>
  <pre><code> #paths = list of image paths; say 10 image-paths
   #document_text = list of strings as long as 200 words corresponding each image. say 10 strings
  
   %matplotlib inline
   import matplotlib.pylplot as plt
   from PIL import Image
   
   for path,text in enumerate(paths,document_text):
            print(document_text)
            img = Image.open(path)
            plt.imshow(img)
  </code></pre>
  <p>The code block works fine but with a glitch. All print statements gets printed &amp; then all images gets displayed i.e 10 ~200 words strings followed by 10 images. What I wish to have is one print followed by the corresponding image. How can this be achieved? I don't wish to use plt.title() as strings are very long.</p>