compare a defaultdict key-value with another defaultdict

Viewed 2711

I have two defaultdict :

defaultdict(<type 'list'>, {'a': ['OS', 'sys', 'procs'], 'b': ['OS', 'sys']})

defaultdict(<type 'list'>, {'a': ['OS', 'sys'], 'b': ['OS']})

How do I compare these two to get the count of values missing from each one. For example I should get two values are missing from second defaultdict for key 'a' and one missing from 'b'.

3 Answers
Related