title: Python searching multiple directories and reading select files
body: <p>I am looking for some help performing actions on a set of files in two different directories using Python.</p>
  
  <p>I am attempting to:</p>
  
  <ol>
  <li><p>Search two different directories</p></li>
  <li><p>Find the 15 last modified files (comparing files in both directories)</p></li>
  <li><p>Read all 15 recently modified files line by line</p></li>
  </ol>
  
  <p>I can accomplish reading through one file directory using glob. However, I cannot specify multiple directories. Is there another way I can accomplish this?</p>
  
  <p>Below is my code which accomplishes grabbing the latest 15 files in dir1 but not dir2.</p>
  
  <pre><code>dir1 = glob.iglob("/dir1/data_log.*")
  dir2 = glob.iglob("/dir2/message_log.*")
  
  latest=heapq.nlargest(10, dir1, key=os.path.getmtime)
  for fn in latest:
      with open(fn) as f:
          for line in f:
              print(line)
  </code></pre>