How to make two-level nested defaultdict in Python
In order to make a defaultdict
that contains defaultdicts
of dict
, use
nested_defaultdict.py
my_doc = defaultdict(lambda: defaultdict(dict))
Check out similar posts by category:
Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow