How to count the number of occurrence of a values in a dictionary in python
a = dict()
a['cat'] = 1
a['fish'] = 1
a['dog'] = 2
a['bat'] = 3
a['aardvark'] = 3
a['lion'] = 4
a['wallaby'] = 5
a['badger'] = 5
output Expected:
KEY Count
1 2
2 1
3 2
4 1
5 2
EDIT
Sorry , i meant to say counting values
int(key in a), which returns0or1.len(a)?