How to parse a directory structure into dictionary?
<p>I have list of directory structure such as:</p>

<pre><code>['/a/b', '/a/b/c', '/a/b/c/d', '/a/b/c/e', '/a/b/c/f/g', '/a/b/c/f/h', '/a/b/c/f/i']
</code></pre>

<p>I want to convert it into dict like a tree structure. </p>

<pre><code>{'/': {'a': {'b': {'c': 
                       [{'d':None}, 
                        {'e':None}, 
                        {'f':[{'g':None, {'h':None}, {'i':None}]}
                       ]
                  }
             }
      }
}
</code></pre>

<p>I got stuck where to strat ? Which data structure will be suitable? </p>

<p>Thanks.</p>
