API
For Contributors
Set value in nested directory:
>>> dct = {"A": "T", "R": 3} >>> nested_set(dct, keys=["B", "C", "D"], value="value") { "A": "T", "R": 3, "B": { "C": { "D": "value" } } }
dic (dict) – Dictionary
keys (list[str]) – Keys as a list
value – Value to be set