List mapping?

Remco Gerlich scarblac-spamtrap at
Thu Apr 13 13:32:40 EDT 2000

Robert Cragie wrote in comp.lang.python:
> > Howcome you use reduce at all?
> >
> > Works fine with just doing
> >
> > tuplist = map(lambda x: (mylist[x], mylist[x+1]), range(0, len(mylist),
> 2))
> Yep, that's neater. My excuse is that I've only been learning Python for a
> couple of weeks...

In that case, forget you ever read something about map, lambda and reduce.
Save it for later and code nice for loops now. 95% of the time, those things
only obfuscate code anyway.

Remco Gerlich,  scarblac at

   This is no way to be
     Man ought to be free      -- Ted Bundy
       That man should be me

More information about the Python-list mailing list