title: Python unpack 2-dimensional list of named tuples
body: <p>I have a 2-dimensional list of named tuples (let's say that each tuple has N values), and I want to unpack them into N different 2-dimensional lists where each unpacked 2-D list is composed entirely of a single attribute from the original list. For example if I have this 2-D list:</p>
  
  <pre><code>&gt;&gt;&gt; combo = namedtuple('combo', 'i, f, s')
  &gt;&gt;&gt; combo_mat = [[combo(i + 3*j, float(i + 3*j), str(i + 3*j)) for i in range(3)]
                   for j in range(3)]
  &gt;&gt;&gt; combo_mat
  [[combo(i=0, f=0.0, s='0'), combo(i=1, f=1.0, s='1'), combo(i=2, f=2.0, s='2')],
   [combo(i=3, f=3.0, s='3'), combo(i=4, f=4.0, s='4'), combo(i=5, f=5.0, s='5')],
   [combo(i=6, f=6.0, s='6'), combo(i=7, f=7.0, s='7'), combo(i=8, f=8.0, s='8')]]
  </code></pre>
  
  <p>I'd like the 3 results to be:</p>
  
  <pre><code>[[0, 1, 2],
   [3, 4, 5],
   [6, 7, 8]]
  
  [[0.0, 1.0, 2.0],
   [3.0, 4.0, 5.0],
   [6.0, 7.0, 8.0]]
  
  [['0', '1', '2'],
   ['3', '4', '5'],
   ['6', '7', '8']]
  </code></pre>
  
  <p>If I just had a 1-dimensional list of tuples I'd use <code>zip(*mylist)</code>, like:</p>
  
  <pre><code>&gt;&gt;&gt; zip(*[combo(i=0, f=0.0, s='0'), combo(i=1, f=1.0, s='1'), combo(i=2, f=2.0, s='2')])
  [(0, 1, 2), (0.0, 1.0, 2.0), ('0', '1', '2')]
  </code></pre>
  
  <p>And I can extend this to my situation just by nesting:</p>
  
  <pre><code>&gt;&gt;&gt; zip(*[zip(*combs) for combs in combo_mat])
  [((0, 1, 2),
    (3, 4, 5),
    (6, 7, 8)),
   ((0.0, 1.0, 2.0),
    (3.0, 4.0, 5.0),
    (6.0, 7.0, 8.0)),
   (('0', '1', '2'),
    ('3', '4', '5'),
    ('6', '7', '8'))]
  </code></pre>
  
  <p>But this doesn't give me the lists I wanted, and nested unpacking <code>zip(*)</code> functions isn't that readable. Anyone have any ideas for a more pythonic solution? Bonus points if you can work the names of the tuples' attributes in there somewhere in the end result.</p>
  
  <p>Actually, now that I think of it, it would be <strong>ideal</strong> if I could have a dict that mapped the name of the tuple attribute to its respective matrix, like:</p>
  
  <pre><code>{'i': [[0, 1, 2],
         [3, 4, 5],
         [6, 7, 8]], 
   'f': [[0.0, 1.0, 2.0],
         [3.0, 4.0, 5.0],
         [6.0, 7.0, 8.0]]
   's': [['0', '1', '2'],
         ['3', '4', '5'],
         ['6', '7', '8']]}
  </code></pre>