python:

1 import random
2 
3 def randomMore(min,max,n):
4     res = []
5     while len(res) != n:
6         num = random.randrange(min,max)
7         if num not in res:
8             res.append(num)
9     print(res)
View Code

相关文章: