How do I create a dict of dict of lists using defaultdict? I am getting the following error.
>>> from collections import defaultdict >>> a=
It's a little tricky. You make a defaultdict of defaultdicts, like so:
defaultdict(lambda: defaultdict(list))