This question already has an answer here:
I want to generate a random number with the random function. After that I want to generate another random number from a list with numbers, but it can't take the other random number.
import random
x = random.randint(1,10)
y = random.randint(1,10) #except of x
print(x)
print(y)
possible output
5
7
but not
5
5
Aucun commentaire:
Enregistrer un commentaire