random.sample not repeating code example
Example 1: generate a list of random non repeated numbers python
#This will return a list of 50 numbers selected from the range 0 to 999, without duplicates.
import random
random.sample(range(1000), 50)
Example 2: python random number generator no duplicates
python -c "import random; print(sorted(set([random.randint(6,49) for i in range(7)]))[:6])"