newbie - concatanating 2 lists

Remco Gerlich scarblac at
Thu Feb 22 21:32:04 CET 2001

Steve Purcell <stephen_purcell at> wrote in comp.lang.python:
> Hang on, it *is* still the shortest way in Python 2:
>         li3 = [a+b for a,b in zip(li1,li2)]
>         li3 = map(lambda a,b:a+b,li1,li2)

          li3 = map(''.join,zip(li1,li2))
(as mentioned before)

Is two strokes smaller.

That's just my luck. First time I ever win at Perl Golf, it's in Python...

Remco Gerlich

More information about the Python-list mailing list