Given a dictionary, d
, of type {key: (v1,v2)}
, I'd like to perform a division on v1,v2
for all keys to produce a score, v3
so my dict is of type {key: (v1,v2,v3)}
.
I understand I can do:
for key,v1,v2 in d.items():
score = v1/v2
But can't work out how to then store this in the dictionary.