[Tutor] Iterating over multiple lists- options

Kent Johnson kent37 at tds.net
Tue Feb 8 04:32:06 CET 2005


Tony Cappellini wrote:
> 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.

The first argument to map() is a function or None, not one of the lists. You should try map(None, 
shortlist, longerlist).

Kent



More information about the Tutor mailing list