"Jonathan Gardner" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> 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?
>

Actually, this is not exactly what I was looking for.  I failed to realize 
what map did, in this case using the labmda x: x[0] on each item of the list 
returning a list of the key numbers.  The problem is that the changes made 
to my dictionary (in my example dictionary["VERIFIED"]=1) needs to be based 
on the other values in each list in LIST1.

In my example LIST1 was defined as
[[5L, 1L, 1L, 'Personal Information'], [14L, 2L, 1L, '']]

So, the dictionary changes would be involving mylist[1:] for each mylist in 
LIST1 based on the comparison to mylist[0]...

Thank again 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to