I would like dict3
to match dict2
after running it through this loop. It doesn't have to be a loop if there is an easier way.
dict1={'key1' : 'val1', 'key2' : ''}
dict2={'key1' : 'val1', 'key2' : 'val2'}
dict3=dict1
#pseudocode
for key in dict1.keys():
if value is not None:
#no need to do anything
else:
dict3[value] = dict2[value]
What I would like is for dict3 to contain keys and values matching dict2.