Can you dynamically create the arguments for the zip() function in python 2? -
i passing in variable number of lists in *args function. i'd accomplish pass args zip().
def amv(db, *args): x = zip(args) return x
i avoid following:
if len(args) == 1: x = zip(args[1]) elif len(args) == 2: x = zip(args[1], args[2]) ...etc.
erm... have it.
x = zip(*args)
Comments
Post a Comment