title: how to open files that match a pattern in a subdirectory
body: <p>Hello i have a problem finding and opening files in a subdirectory.
  I have several different files called for example :<br>
      mouse_1_animal.txt<br>
      mouse_2_animal.txt
      mouse_3_animal.txt</p>
  
  <p>so i want to find all these files in the subdirectory of the working dir and open them and do something with there lines. This is my try:</p>
  
  <pre><code>i=1
  for path, subdirs, files in os.walk(root) :
      for file in files :
          if file == "mouse_{0}_animal.txt".format(i) :
              #do something
              i = i + 1
  </code></pre>
  
  <p>but apparently it doesn't find all the files so i'm wondering if it's the way i'm using to find the file that is wrong. </p>