Let\'s say I have a dictionary in which the keys map to integers like:
d = {\'key1\': 1,\'key2\': 14,\'key3\': 47}
Is there a syntactically
phihag's answer (and similar ones) won't work in python3.
For python 3:
d = {'key1': 1,'key2': 14,'key3': 47} sum(list(d.values()))
Update! There are complains that it doesn't work! I just attach a screenshot from my terminal. Could be some mismatch in versions etc.