Re: [Tutor] Looking for a Pythonic way to pass variable number of lists to zip()

2005-03-22 Thread Danny Yoo
> well, I would have said "apply(zip, (l1, l2, l3, ...))" but apply has > been deprecated in 2.3. Hi Sean, Sorry for straying away from the original poster's question, but do you know why apply() is being deprecated? This is new to me! ... ok, I see some discussion on it: http://mail.python.

Re: [Tutor] Looking for a Pythonic way to pass variable number of lists to zip()

2005-03-22 Thread Kent Johnson
Shidai Liu wrote: On Mon, 21 Mar 2005 22:51:31 -0800, Sean Perry <[EMAIL PROTECTED]> wrote: arg_list = [] # fill up arg_list zipped = zip(*arg_list) I met a similar question. what if one has L = [[1,2],[3,4]], K = [100, 200] What do you want to do with these lists? How to 'zip' a List like [[1,2,10

Re: [Tutor] Looking for a Pythonic way to pass variable number of lists to zip()

2005-03-22 Thread Shidai Liu
On Mon, 21 Mar 2005 22:51:31 -0800, Sean Perry <[EMAIL PROTECTED]> wrote: > Tony Cappellini wrote: > > well, I would have said "apply(zip, (l1, l2, l3, ...))" but apply has > been deprecated in 2.3. > > So how about this? > > arg_list = [] > # fill up arg_list > zipped = zip(*arg_list) > I met

Re: [Tutor] Looking for a Pythonic way to pass variable number of lists to zip()

2005-03-21 Thread Sean Perry
Tony Cappellini wrote: I have a program which currently passes 6 lists as arguments to zip(), but this could easily change to a larger number of arguments. Would someone suggest a way to pass a variable number of lists to zip() ? well, I would have said "apply(zip, (l1, l2, l3, ...))" but apply

[Tutor] Looking for a Pythonic way to pass variable number of lists to zip()

2005-03-21 Thread Tony Cappellini
I have a program which currently passes 6 lists as arguments to zip(), but this could easily change to a larger number of arguments. Would someone suggest a way to pass a variable number of lists to zip() ? ___ Tutor maillist - Tutor@python.org http: