title: Swap axes of a multidimensional Python list
body: <p>How to swap the axes of a multidimensional Python list? </p>
  
  <p>For example, if the multidimensional Python list is <code>input = [[1,2], [3,4,5],[6]]</code>, I would like to have <code>output = [[1,3,6], [2,4], [5]]</code> as output.</p>
  
  <p><a href="http://docs.scipy.org/doc/numpy-1.10.1/reference/generated/numpy.swapaxes.html" rel="nofollow"><code>numpy.swapaxes</code></a> allows to do so for an array, but it doesn't support the case where a dimension has a varying size, as in the given example. Same issue with the typical <code>map(list, zip(*l))</code>.</p>