On 7/25/2010 8:03 AM, targetsmart wrote:
Hi,
I am trying to compare two nested dictionaries, I want to know what is
the exact difference between them.
d1 = {'a' : 1, 'b' : 2, 'c': 3 }
d2 = {'a' : 1, 'b' : 3, 'd': 4 }
diff = dict(s
[targetsmart]
> > I am trying to compare two nested dictionaries, I want to know what is
> > the exact difference between them. I tried this solution
[Steven D'Aprano]
> If you want to know the difference between two dictionaries, you have to
> consider:
>
> (1) Ke
Hi,
On 07/25/2010 06:21 PM, Steven D'Aprano wrote:
> On Sun, 25 Jul 2010 08:03:06 -0700, targetsmart wrote:
>
>> Hi,
>> I am trying to compare two nested dictionaries, I want to know what is
>> the exact difference between them. I tried this solution
>>
On Sun, 25 Jul 2010 08:03:06 -0700, targetsmart wrote:
> Hi,
> I am trying to compare two nested dictionaries, I want to know what is
> the exact difference between them. I tried this solution
>
> ...
> s1 = set(result1)
> s2 = set(result2)
> p
Hi,
I am trying to compare two nested dictionaries, I want to know what is
the exact difference between them. I tried this solution
...
s1 = set(result1)
s2 = set(result2)
print s1 - s2
but it doesn't seem show any difference, but
assert result1 == result2
fails