随机输出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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2021-06-04
  • 2022-01-04
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2021-07-07
  • 2021-10-17
  • 2021-11-11
  • 2022-01-03
相关资源
相似解决方案