def zip(*args, **kwargs):
 args = [list(iterable) for iterable in args]
 n = max(map(len, args))
 v = kwargs.get('default', None)
 return _zip(*[(i + ([v] * (n - len(i)))) for i in args])

def zip ( * args , ** kwargs ) : args = [ list ( iterable ) for iterable in args ] n = max ( map ( len , args ) ) v = kwargs . get ( 'default' , None ) return _zip ( * [ ( i + ( [ v ] * ( n - len ( i ) ) ) ) for i in args ] )
returns a list of tuples .