dict order

Kirk Strauser kirk at daycos.com
Wed Jun 18 10:45:18 EDT 2008


At 2008-06-18T10:32:48Z, cokofreedom at gmail.com writes:

> # untested 2.5
> for keys in dict_one.items():
>   if keys in dict_two:
>     if dict_one[keys] != dict_two[keys]:
>       # values are different
>   else:
>     # key is not present

That fails if there is an item in dict_two that's not in dict_one.
-- 
Kirk Strauser
The Day Companies



More information about the Python-list mailing list