How can I report an error if the dictionary sees the key with the different value
===

Suppose I have default dictionary of lists like given below:

defaultdict(<type 'list'>, {'A': [4, 3, 3, 3], 'S': [1]})

Now in key 'A' I don't want 3 and 4 as the values of the same list.
So, I just need to report an error otherwise don't report

How can I go for this?