I've written code in python in order to generate random numbers between 110-115, 19 times. The code works however I would like to add code that states that the same random numbers cannot be printed out next to each other, they can only be printed out after the other 5 numbers have been used. for example:
[112, 113, 115, 110, 111, 114, 112, 113, 115, 110, 111, 114...]
until 19 values have been printed.
I have the following code:
randomlist = []
for i in range(19):
n = random.randint(110,115)
randomlist.append(n)
print(*randomlist, sep = "\n")