if I have a dictionary
example = {'cat' : 1, 'dog' : 2, 'cow' : 3, 'horse' : 4}
How would I add the values together?
I've tried
count = 0
for x in example:
example[x] += count
print example
But that just prints example three times. How do I do it so I get 10 as an answer?