📜  如何在python代码示例中生成随机数

📅  最后修改于: 2022-03-11 14:46:49.404000             🧑  作者: Mango

代码示例6
# generate random integer values
from random import seed
from random import randint
# seed random number generator
seed(1)
# generate some integers
for _ in range(10):
    value = randint(0, 10)
    print(value)