📜  生成随机不重复数字的列表 python 代码示例

📅  最后修改于: 2022-03-11 14:47:15.753000             🧑  作者: Mango

代码示例1
#This will return a list of 50 numbers selected from the range 0 to 999, without duplicates.
import random
random.sample(range(1000), 50)