Creating random list of specific length with no repetition.

Salam,
In order to create a list of random integers we can use the built in function RandomInteger[range, n] . The result of course conatins n elements in the specified range (with repetition). What is the best way to create such list without redandancy ?
Regards

RandomSample[{a,b,c,…},n] never samples any of the a,b,c,… more than once. So this should work:

In[1]:= RandomSample[Range[100], 10]
Out[1]= {71, 53, 41, 11, 25, 73, 67, 52, 5, 74}

It works :slight_smile:

Thanks Sam