想問問各位大佬,我想要在0到10內取200個亂數,用什么方法好呀
試了用random.sample(range(0,10),5) 就只能取5個在0到10的整數
求各位大佬能指點指點
uj5u.com熱心網友回復:
[random.randint(0, 10) for _ in range(200)]
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/280785.html
上一篇:求助關于MATLAB 2020b開發環境和運行時環境的編碼配置為UTF-8的方法。(
下一篇:問一個python的小問題
