title: Python how to create a dict of dict of list with defaultdict
body: <p>How do I create a dict of dict of lists using defaultdict? I am getting the following error.</p>
  
  <pre><code>&gt;&gt;&gt; from collections import defaultdict
  &gt;&gt;&gt; a=defaultdict()
  &gt;&gt;&gt; a["testkey"]=None
  &gt;&gt;&gt; a
  defaultdict(None, {'testkey': None})
  &gt;&gt;&gt; a["testkey"]["list"]=[]
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: 'NoneType' object does not support item assignment
  </code></pre>