How to create a nested dictionary from a list in Python?
<p>I have a list of strings: <code>tree_list = ['Parents', 'Children', 'GrandChildren']</code></p>

<p>How can i take that list and convert it to a nested dictionary like this?</p>

<pre><code>tree_dict = {
    'Parents': {
        'Children': {
            'GrandChildren' : {}
        }
    }
}

print tree_dict['Parents']['Children']['GrandChildren']
</code></pre>