title: Capture subdirectory names as variable
body: <p>I'm trying to write code that will read through a given directory, list the folder names within, and allow me to save them as variables. This will later be used to run searches off those names.</p>
  
  <p>I'm using this right now, which will list out all the folders correctly, but I'm not sure where to go from there.</p>
  
  <pre><code>import os
  print [os.path.abspath(name) for name in os.listdir(".") if os.path.isdir(name)]
  </code></pre>