> The corner case is when dealing with empty lists and there aren't > enough items to unpack. > > Another solution to zip(), with a slightly different behaviour for conner cases ....
>>> a = (1,2,3) >>> b = (1,2,3) >>> c = (1,2,3,4) >>> zip(a,b) [(1, 1), (2, 2), (3, 3)] >>> map(None,a,b) [(1, 1), (2, 2), (3, 3)] >>> zip(a,c) [(1, 1), (2, 2), (3, 3)] >>> map(None,a,c) [(1, 1), (2, 2), (3, 3), (None, 4)]
-- http://mail.python.org/mailman/listinfo/python-list