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:
define your own function:
In [64]: def myzip(*args):
lenn=len(args[0])
return list(izip_longest(*[islice(x,lenn) for x in args],fillvalue=None))
....:
In [30]: myzip(a,b)
Out[30]: [(1, 5), (2, 6), (3, 7), (4, 8)]
In [31]: myzip(b,c)
Out[31]: [(5, 10), (6, 11), (7, 12), (8, None), (9, None)]
In [32]: myzip(a,c)
Out[32]: [(1, 10), (2, 11), (3, 12), (4, None)]