I need a little help with python. I have 2 dictionaries wich have the same keys but different values. I wan't to multiply the same keys values in the different dictionaries and then take the sum. I have to do it with the for loop becouse dictionary is long.
example of what i tried
Code:
dictionary1 = {
"a": 1,
"b": 2,
"c": 3,
"d": 4
}
dictionary2= {
"a": 5,
"b": 6,
"c": 7,
"d": 8
}
for variable in dictionary1:
dictionary1[variable] * dictionary2[variable]
"""after this it listed out the multiplication of the
keys values but how can i add all them
becouse it came out like this
5
12
21
32
"""






