Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13861

Python list to dictionary of dictionaries' key order [duplicate]

$
0
0

I want to take an list ['a', 'b', 'c'] and I want to use it as the "recursive" indices into a dictionary of dictionaries.

dict = {'a': {'b': {'c': "hello world"}}}

I want to perform the following assignment operation dict['a']['b']['c'] = value

No need for the solution to be 2.x compatible.


Viewing all articles
Browse latest Browse all 13861

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>