Skip to main content

random

Return a random item from the list.

def random(
value: list
) - > any

Return a random item from the list.

Parameters

NameTypeDescription
valuelistThe sequence or list of items from which to select a random element

Returns

TypeDescription
anyA randomly selected element from the input sequence, or an empty string if the sequence is empty