6. Write a python program to sum up all the values in a Python dictionary, dict_a as a Python dictionary showed in the following output.
The output is:
dict_a = {'Python_user': 2357, 'R-Programming_user':1988, 'Java_user':597}
Expected Answer:
The sum of programmer in town A is 4942
Sample Answer:
dict_a = {'Python_user': 2357, 'R-Programming_user':1988, 'Java_user':597} print("The sum of programmers in town A is", sum(dict_a.values()))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)