In [5]:
from collections import Counter
a = Counter(x=1, y=2)
b = Counter(x=1, y=2, z = 0)
In [6]:
a == b
Out[6]:
In [7]:
a - b == Counter()
Out[7]:
In [8]:
+a == +b
Out[8]:
In [12]:
c = Counter(x=1, y=2, z = -1)
In [11]:
+a == +b == +c
Out[11]:
In [13]:
a - c
Out[13]:
In [14]:
a - b
Out[14]:
No comments:
Post a Comment