Could someone explain the following?
>>> a = {1}
>>> b = {2}
>>> a & b == set()
True
>>> a & b == {}
False
Why is this choice made?
Could someone explain the following?
>>> a = {1}
>>> b = {2}
>>> a & b == set()
True
>>> a & b == {}
False
Why is this choice made?
 
    
    Your code a & b == {} is comparing a ANDed with b with {}, an empty dictionary. So, the result of the and and an empty dictionary are different and the result is false.
 
    
    