Answers for "defaultdict item count"

0

defaultdict item count

>>> dict = {'a': 1, 'b': 1, 'c': 3, 'd': 4}
Item Count
>>> len(dict)
4
Count of Items Values
>>> sum(dict.values())
9
Posted by: Guest on February-05-2020

Python Answers by Framework

Browse Popular Code Answers by Language