Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Credit: Raymond Hettinger, Alex Martelli, Matt R
You need a set-like collection type that lets each element be in the set a number of times. In other words, you need a collection type of the kind that is known as multiset in C++ and SQL, and bag in Smalltalk, Objective C, and Haskell's Edison module.