Say I have these three lists:
a = [1, 2, 3, 4] b = [5, 6, 7, 8, 9] c = [10, 11, 12]
Is there a builtin function such that:
import itertools as it somezip = lambda *x: it.islice(it.izip_longest(*x), len(x[0])) >>> list(somezip(a,b)) [(1, 5), (2, 6), (3, 7), (4, 8)] >>> list(somezip(a,c)) [(1, 10), (2, 11), (3, 12), (4, None)]