I would like to create an empty nested dictionary from an arbitrary tuple/list that holds the keys. I am trying to find a simple way to do this in Python. It looks like something that collections defaultdict should handle but I can't seem to figure it out.
keys = ('a', 'b', 'c')
And a dictionary that will end up looking like this:
d = {
'a': {
'b': {
'c': {}
}
}
}