title: Check if a given directory contains any directory in python
body: <p>Essentially, I'm wondering if the top answer given to <a href="https://stackoverflow.com/questions/9504073/check-that-any-directory-exists-inside-given-one">this question</a> can be implemented in Python. I am reviewing the modules os, os.path, and shutil and I haven't yet been able to find an easy equivalent, though I assume I'm just missing something simple.</p>
  
  <p>More specifically, say I have a directory A, and inside directory A is <em>any other directory</em>. I can call <code>os.walk('path/to/A')</code> and check if <code>dirnames</code> is empty, but I don't want to make the program go through the entire tree rooted at A; i.e. what I'm looking for should stop and return true as soon as it finds a subdirectory.</p>
  
  <p>For clarity, on a directory containing files but no directories an acceptable solution will return False.</p>