title: Extract all keys in the second level of nested dictionary
body: <p>I would like to extract all keys in second level of 2d dictionary but python interpreter return NameError.  my expected result is ['aa', 'bb', 'cc', 'aaa', 'bbb', 'ccc']</p>
  
  <pre><code>&gt;&gt;&gt; adict
  defaultdict(&lt;class 'dict'&gt;, {'b': {'aaa': 444, 'ccc': 666, 'bbb': 555}, 'a': {'aa': 111, 'cc': 333, 'bb': 222}})
  
  &gt;&gt;&gt; all = [ele for ele in adict[ww].keys() for ww in ['a', 'b']]
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  NameError: name 'ww' is not defined
  </code></pre>