how to count dictionary values in python code example
Example 1: python counting dictionary
counts = dict()
for i in items:
counts[i] = counts.get(i, 0) + 1
Example 2: Python - Count the Number of Keys in a Python Dictionary
pythonCopydict1 = {'a':1,'b':2,'c':3}
print(len(dict1.keys()))