Is there a built-in function that works like zip() but that will pad the results so that the length of the resultant list is the length of the longest input rather
For Python 2.6x use itertools module's izip_longest.
itertools
For Python 3 use zip_longest instead (no leading i).
i
>>> list(itertools.izip_longest(a, b, c)) [('a1', 'b1', 'c1'), (None, 'b2', 'c2'), (None, 'b3', None)]