2010/5/18 Guido van Rossum <guido at python.org>: > This is typically called a "bag". Maybe searching for that will help > you find a recipe? Yes, and we have one in Python 2.7+ called collections.Counter. -- Regards, Benjamin