HomePython Write a Python program to sum of all counts in a collections Vikram somai October 29, 2021 0 Comments Facebook Twitter Write a Python program to sum of all counts in a collectionsexample :- 2,4,1,4,6,6,2output:-7code:-import collections num = [3,5,32,2,1,4,5,9] print(sum(collections.Counter(num).values())) output:-8>>> Tags Python Facebook Twitter
Post a Comment
If you have any doubts, Please let me know
Thanks!