title: Do I understand os.walk right?
body: <p>The loop for root, dir, file in <code>os.walk(startdir)</code> works through these steps?</p>
  <pre><code>for root in os.walk(startdir) 
      for dir in root 
          for files in dir
  </code></pre>
  <ol>
  <li><p>get root of start dir : C:\dir1\dir2\startdir</p>
  </li>
  <li><p>get folders in C:\dir1\dir2\startdir and return list of folders &quot;dirlist&quot;</p>
  </li>
  <li><p>get files in the first dirlist item and return the list of files &quot;filelist&quot; as the first item of a list of filelists.</p>
  </li>
  <li><p>move to the second item in dirlist and return the list of files in this folder &quot;filelist2&quot; as the second item of a list of filelists. etc.</p>
  </li>
  <li><p>move to the next root in the folder tree and start from 2. etc.</p>
  </li>
  </ol>
  <p>Right? Or does it just get all roots first, then all dirs second, and all files third?</p>