📜  如何获取随机数python代码示例

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

代码示例4
# 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)