Function: random_select

Function: random_select

since 0.3.7


 random_select(some_list, count: some_number, replace: some_boolean)

Randomly select an items from a list.

Since the result is random, calling the function twice will give a different answer.


Parameter Type Description
input list List to shuffle.


 random_select([1,2,3,4]) == 4
 random_select([1,2,3,4]) == 2

See also

random_select_many Pick multiple random elements from a list.
random_shuffle Randomly shuffle a list.