A random word from one of two lists

Mats Wichmann mats at wichmann.us
Sun Jan 3 14:40:47 EST 2021


On 1/3/21 11:34 AM, Richard Damon wrote:

> It depends on what distribution of results you want. Since the example
> had two equal length list is doesn't matter, but if, say, there were
> many more animals then fruit, your method would produce an animal more
> often than a fruit, but the two level method will make the distribution
> 50% fruits, 50% animals independent on the number in each category.
> 
> Which is the right answer is problem specific.

quite true!




More information about the Python-list mailing list