random.random()生成0和1之间的随机浮点数float
例如:
1 | print ("random 7 is ", random.random()) |
运行结果为:
1 | random 7 is 0.32383276483316237 |
原文链接: http://yoursite.com/2018/10/31/python之random的random的使用/
版权声明: 转载请注明出处.
random.random()生成0和1之间的随机浮点数float
例如:
1 | print ("random 7 is ", random.random()) |
运行结果为:
1 | random 7 is 0.32383276483316237 |
原文链接: http://yoursite.com/2018/10/31/python之random的random的使用/
版权声明: 转载请注明出处.