I'm quite the beginner in Python.
I have two dictionaries, where each key is a product and each value is the price to each product.
productData_1 = {'product_1': '18', 'product_2': '15', 'product_3': '10', 'product_4': '9'}
productData_2 = {'product_1': '18', 'product_3': '12', 'product_2': '15'}
What I want to do is compare both dictionaries both by keys and by values, so that I can see the differences between both dicts, e.g. are there different prices, is a product missing in productData_1
or _2
?
I know that I have to iterate over both dicts in some way but I can't figure out how to do it.