Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Write a Python program to sum all the items in a dictionary.

my_dict = {'data1':100,'data2':-54,'data3':247}

print(sum(my_dict.values()))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Write #Python #program #sum #items
ADD COMMENT
Topic
Name
6+1 =