[英]Trying to create a list of 10 random numbers between 1-10 that do not repeat in python
This is not the whole program I want to write but right now I'm just trying to figure out this simple thing.这不是我想要编写的整个程序,但现在我只是想弄清楚这个简单的事情。 And if you couldn't tell, I am completely new to programming.
如果你不知道,我对编程完全陌生。
import random
random.sample(range(10), 10)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.