Handled more cases in the test case.
If there are items in the list that have different lengths.
In [19]: a Out[19]: [[1, 2], [3, 4], [5, 6], [7, 8, 9]] In [20]: import itertools In [21]: b = itertools.izip_longest(*a) In [22]: list(b) Out[22]: [(1, 3, 5, 7), (2, 4, 6, 8), (None, None, None, 9)]
source share