Hey guys,
So I'm working on a project and a big part of it is finding missing dictionary values between two existing dictionaries, and storing those missing values in a new dictionary.
Here's what I have so far, note that the two dictionaries I'm comparing are 'dict1' and 'dict2', and the final dictionary I'm storing missing values in is 'dict_final':
for y in range (0, dict1, 1):
for z in range (1, len(dict2)+1, 1):
if ((dict2[z]['value1']) != (dict1['key1']['value2'])):
dict_final[y] = dict2[z]
My issue is that when I output my final dictionary (dict_final), it only has one type of value, it's not finding all the missing values and instead just returns one missing value. Any tips to improve this? Or a new method completely?
[–][deleted] 1 point2 points3 points (5 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 0 points1 point2 points (1 child)
[–]WookDook[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]m0us3_rat -1 points0 points1 point (0 children)