libb.random_choice

random_choice(choices)[source]

Random choice from a list, seeded with OS entropy.

Parameters:

choices (list) – List of items to choose from.

Returns:

Randomly selected item.

Example:

>>> result = random_choice(['a', 'b', 'c'])
>>> result in ['a', 'b', 'c']
True