FW: newbie - concatanating 2 lists
zzzzz
zzizz_ at notmail.com
Sat Feb 24 02:28:01 EST 2001
On Wed, 21 Feb 2001 19:25:30 +0100, Max Haas <Max.Haas at unibas.ch>
wrote:
>> i have:
>>
>> li1 = ['a', 'b', 'c']
>> li2 = ['x', 'y', 'z']
>>
>> i want:
>>
>> li3 = ['ax', 'by', 'cz']
try:
map(lambda a,b: a+b,li1,li2)
>
>Hi gnana,
>
>perhaps the first step could be:
>
>li1 = ['a', 'b', 'c']
>li2 = ['x', 'y', 'z']
>p = 0
>m = []
>
>for item in li1:
> m.append(item + li2[p])
> p = p + 1
>print m
>
>Max
rgds z.
More information about the Python-list
mailing list