How do I create a dict of dict of lists using defaultdict? I am getting the following error.
>>> from collections import defaultdict >>> a=
You may have to do like this.
>>> from collections import defaultdict >>> a=defaultdict() >>> a["testkey"]=None >>> a["testkey"]=defaultdict(list) >>> a["testkey"]["list"]=["a","b","c"] >>> a defaultdict(None, {'testkey': defaultdict(, {'list': ['a', 'b', 'c']})})