title: Grid of images using a loop in Jupyter-Notebook. How?
body: <p>I want to show images <code>var_1.png,...,var_40.png</code> in a 2x3 matrix format inside a Jupyter Notebook.
  <a href="https://i.stack.imgur.com/Qupf1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qupf1.png" alt="enter image description here"></a>
  However, I only manage to do it manually:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import matplotlib.image as mpimg
  
  %matplotlib inline
  
  img1=mpimg.imread('Variable_8.png')
  img2=mpimg.imread('Variable_17.png')
  img3=mpimg.imread('Variable_18.png')
            ...
  
  fig, ((ax1, ax2, ax3), (ax4,ax5,ax6)) = plt.subplots(2, 3, sharex=True, sharey=True) 
  
  ax1.imshow(img1)
  ax1.axis('off')
  ax2.imshow(img2)
  ax2.axis('off')
     ....
  </code></pre>
  
  <p>I want something cleaner. Something like a list comprehension that specifies </p>
  
  <pre><code>image=[img(i)=mpimg.imread('Variable_(i).png') for i in [8,17,28, ..]
  
  [ax[j].imshow(img(j)),ax[j].axis('off') for j in range(len(image))]
  </code></pre>
  
  <p>Some help?</p>