public static choice<T>(values as IList<T>) as T:
Returns a random element from a non-empty read-only list.
| Parameter | Description |
|---|---|
values | Source list. |
One element selected uniformly from the list.
import klyn.math color = Random.choice(["red", "green", "blue"]) print(color)