title: How to read an image name with PIL
body: <p>I'm going to open some image:</p>
  
  <p>image = Image.open(path)</p>
  
  <p>And now I want to store their names in a variable so I can use them later, how can I do this?</p>
  
  <p>The idea is to create a loop:</p>
  
  <pre><code>for i in range (0,20) # I have 20 images
  </code></pre>
  
  <p>And from there we can create a condition:</p>
  
  <pre><code>if variable_containing_image_name == 'something*.jpg'
  
  else:
  </code></pre>
  
  <p>P.S.: I'm using:</p>
  
  <pre><code>from PIL import Image
  import glob, os
  import numpy as np
  </code></pre>