How I can validate data type of each value of the following dictionary or throw exception dict = {"A":"some_string", "B":12, "C":83, "D":True}
I have to validate such that if key is A then value should be string and if key is B then value should be int, C then value should be int and if key is D value should be boolean. so based on key, validation for values also varies...
And if these conditions are not satisfying we must get an exception and program execution must stop
How can I do this?