📅  最后修改于: 2022-03-11 14:47:16.728000             🧑  作者: Mango
代码示例1
import random
data = [1, 2, 3, 4, 5, 6]
probability = [0.3, 0.3, 0.1, 0.1, 0.1, 0.1]
random.choices(data, probability)