Python Sum Dictionary
# Python3.x Python Calculate Sum of Dictionary Values
[ Python3 Examples](#)
Given a dictionary, then calculate the sum of all their numeric values.
## Example
def returnSum(myDict): sum = 0 for i in myDict: sum = sum + myDictreturn sum dict = {'a': 100, 'b':200, 'c':300} print("Sum :", returnSum(dict))
Executing the above code outputs the following result:
Sum : 600
[ Python3 Examples](#)
YouTip