import random a=random.choice(range(10)) print(a)
Python生成0到9的随机数
原文:https://www.cnblogs.com/ITester520/p/13204494.html