📜  python 生成一个随机数 - Python 代码示例

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

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