title: Extract elements in multiple dictionaries to a list?
body: <p>The raw sources:</p>
  
  <pre><code>data_type = {'Number': ['int','bool','float','complex'],
               'Literal':['str','None','bytes']}
  data_struture = {'Sequence':['list', 'dict', 'tuple','bytearray'],
                   'Set': ['set', 'frozenset']}
  .
  .
  .
  and others
  </code></pre>
  
  <p>I want this:</p>
  
  <p><code>['int','bool','float','complex','str','None','bytes'...]</code></p>
  
  <p>How to do it smarter?</p>
  
  <p>Here is my codes in too many lines of command:</p>
  
  <h3>1. package them in a class</h3>
  
  <pre><code>`class TableContent:
      data_type = {'Number': ['int','bool','float','complex'],
                   'Literal':['str','None','bytes']}
      data_struture = {'Sequence':['list', 'dict', 'tuple','bytearray'],
                       'Set': ['set', 'frozenset']}`
  
  `&gt;&gt;&gt; foo = TableContent`
  </code></pre>
  
  <h3>2.get foo' attributes by vars()</h3>
  
  <pre><code>`&gt;&gt;&gt; vars(foo)
  mappingproxy({'__module__': '__main__', 'data_type': {'Number': ['int', 'bool', 'float', 'complex'], 'Literal': ['str', 'None', 'bytes']}, 'data_struture': {'Sequence': ['list', 'dict', 'tuple', 'bytearray'], 'Set': ['set', 'frozenset']}, '__dict__': &lt;attribute '__dict__' of 'TableContent' objects&gt;, '__weakref__': &lt;attribute '__weakref__' of 'TableContent' objects&gt;, '__doc__': None})`
  </code></pre>
  
  <h3>3.change the mappingproxy to dict:</h3>
  
  <pre><code>`&gt;&gt;&gt;bar = dict(vars(foo))`
  `&gt;&gt;&gt;bar
  ['__main__', {'Number': ['int', 'bool', 'float', 'complex'], 'Literal': ['str', 'None', 'bytes']}, {'Sequence': ['list', 'dict', 'tuple', 'bytearray'], 'Set': ['set', 'frozenset']}, &lt;attribute '__dict__' of 'TableContent' objects&gt;, &lt;attribute '__weakref__' of 'TableContent' objects&gt;, None]`
  </code></pre>
  
  <h3>4. slice the qualified elements</h3>
  
  <pre><code>&gt;&gt;&gt;bar = bar[1:-3]
  &gt;&gt;&gt;bar
  [{'Number': ['int', 'bool', 'float', 'complex'], 'Literal': ['str', 'None', 'bytes']}, {'Sequence': ['list', 'dict', 'tuple', 'bytearray'], 'Set': ['set', 'frozenset']}]
  </code></pre>
  
  <h3>5. get values from the dic list</h3>
  
  <pre><code>&gt;&gt;&gt;baz = [ i.values() for i in bar]
  &gt;&gt;&gt;baz
  [dict_values([['int', 'bool', 'float', 'complex'], ['str', 'None', 'bytes']]), dict_values([['list', 'dict', 'tuple', 'bytearray'], ['set', 'frozenset']])]
  </code></pre>
  
  <h3>6. change view object to list</h3>
  
  <pre><code>&gt;&gt;&gt;zot = [list(i.values()) for i in bar]
  &gt;&gt;&gt;zot
  &gt;&gt;&gt;[[['int', 'bool', 'float', 'complex'], ['str', 'None', 'bytes']], [['list', 'dict', 'tuple', 'bytearray'], ['set', 'frozenset']]]
  </code></pre>
  
  <h3>7. change list to string</h3>
  
  <pre><code>&gt;&gt;&gt;str(zot)
  "[[['int', 'bool', 'float', 'complex'], ['str', 'None', 'bytes']], [['list', 'dict', 'tuple', 'bytearray'], ['set', 'frozenset']]]"
  </code></pre>
  
  <h3>8. manipulate the string</h3>
  
  <pre><code>&gt;&gt;&gt;zot = zot.replace('[', '')
  "'int', 'bool', 'float', 'complex'], 'str', 'None', 'bytes']], 'list', 'dict', 'tuple', 'bytearray'], 'set', 'frozenset']]]"
  &gt;&gt;&gt;zot = zot.replace(']', '')
  "'int', 'bool', 'float', 'complex', 'str', 'None', 'bytes', 'list', 'dict', 'tuple', 'bytearray', 'set', 'frozenset'"
  </code></pre>
  
  <h3>try to convert string to list</h3>
  
  <pre><code>&gt;&gt;&gt;zot.split()
  ["'int',", "'bool',", "'float',", "'complex',", "'str',", "'None',", "'bytes',", "'list',", "'dict',", "'tuple',", "'bytearray',", "'set',", "'frozenset'"]
  </code></pre>
  
  <h3>call eval()</h3>
  
  <pre><code>&gt;&gt;&gt;eval(zot)
  ('int', 'bool', 'float', 'complex', 'str', 'None', 'bytes', 'list', 'dict', 'tuple', 'bytearray', 'set', 'frozenset')
  </code></pre>
  
  <h3>9. then a list attained</h3>
  
  <pre><code>&gt;&gt;&gt;list(eval(zot))
  ['int', 'bool', 'float', 'complex', 'str', 'None', 'bytes', 'list', 'dict', 'tuple', 'bytearray', 'set', 'frozenset']
  </code></pre>
  
  <p>Could do it smarter?</p>