title: How to specify directory using glob in python?
body: <p>Say I have a list of directories <code>dirs</code>.</p>
  
  <pre><code>dirs = ['C:\\path\\to\\dir1','C:\\path\\to\\dir2','C:\\path\\to\\dir3']
  </code></pre>
  
  <p>And in each of these directories, there are several excel files I want to get a list of. If I just use <code>glob.glob("*.xls*")</code> this only gives me a list of excel files in my current working directory, but I want to specifically get a list of the excel files in "C:\path\to\dir1", "C:\path\to\dir2" etc.</p>
  
  <p>I have tried</p>
  
  <pre><code>import glob
  for direc in dirs:
      print(glob.glob(direc + "*.xls*")
  &gt;&gt;&gt;[]
  </code></pre>
  
  <p>but this just produces empty lists.</p>
  
  <p>What am I doing wrong here? How can I get a list of the excel files in each of the directories in <code>dirs</code>?</p>