How to make two-level nested defaultdict in Python
In order to make a defaultdict
that contains defaultdicts
of dict
, use
my_doc = defaultdict(lambda: defaultdict(dict))
In order to make a defaultdict
that contains defaultdicts
of dict
, use
my_doc = defaultdict(lambda: defaultdict(dict))