Python has my_sample = random.sample(range(100), 10) to randomly sample without replacement from [0, 100).
my_sample = random.sample(range(100), 10)
[0, 100)
Suppose I have sampled n>
n>
Reasonably fast one-liner (O(n + m), n=range,m=old samplesize):
O(n + m)
next_sample = random.sample(set(range(100)).difference(my_sample), 10)