生成不重复随机数

import  random

random.sample(population,k)

population为随机数选取的列表,k为选取个数

原文地址:https://www.cnblogs.com/Yangami/p/10661245.html