<p>
If you pick up a random item from a list, sometimes you will want that one item comes out more often than the others. The simplest way to achieve this is to repeat this item several times in the list. Integer weights can thus be attributed to items in a list, so that the frequency of appearance of each item corresponds to its weight.