arbitrary lists to map

Alex Martelli aleaxit at yahoo.com
Tue Jan 30 16:23:59 EST 2001


<bernard604 at my-deja.com> wrote in message
news:9579v9$osi$1 at nnrp1.deja.com...
> Is there any way that an arbitrary number of lists (or sequences) can
> be assigned to the sequence parameter of the map(func, sequence)
> function.

If your list of lists is called foo, then map(func, *foo) should do it (in
Python 2 or later; in older Pythons, try apply(map, (func,)+tuple(foo)),
I think that's the equivalent).


Alex






More information about the Python-list mailing list