Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from collections import defaultdict
def deep_defaultdict():
return defaultdict(deep_defaultdict)
d = deep_defaultdict()
d['x']['y']['z'] = 'foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.