DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
6+1 =
Submit