代码示例:(标识:python_numpy_random_array_2)
python_numpy_random_array_2.py
from numpy import random

x = random.choice([3, 5, 7, 9])

print(x)
运行结果: