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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -