[Tutor] Iterating over multiple lists- options

Tony Cappellini tony at tcapp.com
Tue Feb 8 01:59:56 CET 2005


LOL

> Here's one, just for your amusement:
>
> But getting back on topic: I like Kent's solution with map() much better
> than my own.  I had completely forgotten that map() had a special case
> that applies directly to what you're trying to do.

I havne't seen Kent's reply yet- will have to look when I get home from
work.
But I 've found some inconsistnacies with map, depending on which order
the args were passed in.
If the shorter list was passed to map first, as in map(shortlist,
longerlist), it behaved one way.

If I reversed the order of the args, as in map(longerlist, shortlist),
map() behaved slighlty different. Almost like what zip() did.

Perhaps Kent's suggestion addresses this. I will see later.

Thanks!


More information about the Tutor mailing list