Find all directories in a directory
<p>Is there a method to find all directories in a given directory? I am trying the following, which gives me an empty list:</p>

<pre><code>[item for item in os.listdir(dir) if os.path.isdir(item)]
</code></pre>
