programming-examples/python/Math/Generate a series of unique random numbers.py

8 lines
228 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import random
choices = list(range(100))
random.shuffle(choices)
print(choices.pop())
while choices:
if input('Want another random number?(n/N)' ).lower() == 'n':
break
print(choices.pop())