I have two collections.defaultdict and trying to remove values from d1 that are also in d2.
from collections import Counter, defaultdict
d1 = Counter({'hi': 22, 'bye': 55, 'ok': 33})
d2 = Counter({'hi': 10, 'hello': 233, 'nvm': 96})
Ideal result:
d3 = set()
d3 = ({'bye':55, 'ok':33})
So far I have tried:
d3 = set()
d3 = d1 - d2
print(d3)
Counter({'bye': 55, 'ok': 33, 'hi': 12})
But this keeps the same value of 'hi' even though I want to remove all similar ones.