Wouldn't it be nice if list.count, called without any arguments, returned a dict with the list's unique items as keys and their frequency of occurance as values?
>>> [1,2,1,'a'].count() {'a': 1, 1: 2, 2: 1} >>> 'hello world'.count() {' ': 1, 'e': 1, 'd': 1, 'h': 1, 'l': 3, 'o': 2, 'r': 1, 'w': 1} ...johahn -- http://mail.python.org/mailman/listinfo/python-list