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
d = {'key1': 1,'key2': 14,'key3': 47} sum1 = sum(d[item] for item in d) print(sum1)
you can do it using the for loop