Hi, I have two dicts, e.g.

dict1 = {'A': 'a', 'B': 'b', 'C': 'c'}
dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'}

I am wondering how to update dict1 using dict2 that

only keys 'A' and 'B' of dict1 are udpated. It will result in

dict1 = {'A': 'aa', 'B': 'bb', 'C': 'c'}

cheers
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to