How to parse a directory tree in python?
<p>I have a directory called "notes" within the notes I have categories which are named "science", "maths" ... within those folder are sub-categories, such as "Quantum Mechanics", "Linear Algebra".</p>

<pre><code>./notes
--&gt; ./notes/maths
------&gt; ./notes/maths/linear_algebra
--&gt; ./notes/physics/
------&gt; ./notes/physics/quantum_mechanics
</code></pre>

<p>My problem is that I don't know how to put the categories and subcategories into TWO SEPARATE list/array.</p>
