Write a Python program to calculate the sum of all items of a container (tuple, list, set, dictionary).
1 2 3 |
s = sum([10,20,30]) print("\nSum of the container: ", s) print() |
1 2 3 |
s = sum([10,20,30]) print("\nSum of the container: ", s) print() |