Creating nested dictionary dynamically in python
0 I am trying to create a nested dictionary dynamically using python. for example I need to create a function that will take the nodes and construct a nested dictionary with these nodes. For example: inputs: 'customers.applicant.individual.first_name' output: customers : applicant: individual: firstname: and for each node, i need to make sure if it exist already if it does than skip else create the node. Can anyone please provide any help on this. Thanks python python-3.x share | improve this question edited Nov 14 '18 at 4:12 khelwood 31.6k 7 43 64 asked Nov 14 '18 at 3:37 skidwa skidwa 6 2 What have you tried so far? – b-fg Nov 14 '18 at 5:52 add a comment | 0 I am trying to create a nested dictionary dynamically using python. for example I need to create a function that will take the nodes and construct a nested dictionary with these nodes. For example: inputs: ...