随机输出0-9的数字

from random import choice
x = choice([0,1,2,3,4,5,6,7,8,9])
print x

输出结果

#python first.py
2

#python first.py
3

#python first.py
2

..............

 

posted on 2018-08-29 09:39  宅女士  阅读(477)  评论(0编辑  收藏  举报