Merging two lists of data (Pythonic way)

SMB sean at buildingonline.com
Thu Feb 16 15:51:24 EST 2006


"Jonathan Gardner" <jgardner at jonathangardner.net> wrote in message 
news:1140122391.823206.74580 at g14g2000cwa.googlegroups.com...
> codes = map(lambda x: x[0], list1)
> for d in list2:
>  if d['code'] in codes:
>    d['VERIFIED'] = 1
>
> Is this what you were looking for?
>

That is exactly what I was looking for.  I will have to take a look at map.

Thank you very much 





More information about the Python-list mailing list