If I have a dictionary such as:
my_dict = {\"A\": [1, 2, 3], \"B\": [9, -4, 2], \"C\": [3, 99, 1]}
How do I create a new dictionary with su
Try This:
def sumDictionaryValues(d): new_d = {} for i in d: new_d[i]= sum(d[i]) return new_d