programming-examples/python/Dictionary/Python program to sum all the items in a dictionary.py
2019-11-15 12:59:38 +01:00

2 lines
79 B
Python

my_dict = {'data1':100,'data2':-54,'data3':247}
print(sum(my_dict.values()))