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

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

代码示例6
def randnum(min, max):
    num = random.randint(a, b)
    return num
  randomnumber = randnum(0,10)
  print(randomnumber)
 #output: 5