I have a list of strings: tree_list = ['Parents', 'Children', 'GrandChildren']
How can i take that list and convert it to a nested dictionary like this?
tree_dict = {
'Parents': {
'Children': {
'GrandChildren' : {}
}
}
}
print tree_dict['Parents']['Children']['GrandChildren']