programming-examples/python/Dictionary/Python program to sum all the items in a dictionary.py

2 lines
79 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
my_dict = {'data1':100,'data2':-54,'data3':247}
print(sum(my_dict.values()))