Re:Python iteration
by mickeyp on Wednesday April 25, 2012 @01:46PM
(#3890164)
If you want to transpose a matrix-like list of lists, but the sizes don't all match up, you can use izip_longest from itertools and give it a fillvalue to "fill in" for the missing elements:
[ Parent
| on HN ]
There are no comments on this comment yet.