KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following dict: aDict = { "a" : { "b" : { "c1" : {}, "c2" : {}, } } } a second dict: aSecondDict = { "d1" : {}, "d2" : {}, "d3" : {}, } and a "path" tuple: path = ( "a", "b", "c2" ) I now want to add the second dict to the first at the path provided by the tuple: aResultDict = { "a" : { "b" : { "c1" : {}, "c2" : { "d1" : {}, "d2" : {}, "d3" : {}, }, } } } What is the pythonic way of achieving this?
Tags (comma-separated)
Save Edits
Cancel