mardi 1 décembre 2020

Problem with ransom selected user compare [duplicate]

I have a pool of players.

users

3 players should be selected at random from this pool.

user1 = random.choice (users)
user2 = random.choice (users)
user3 = random.choice (users)

How can I prevent a player from being randomly selected two or three times? And if so, how do I have the duplicate variable selected again at random?

For Example:

user1 = random select Smith

user2 = random select Douglas

user3 = random select Smith

The bot will recognize that Smith was randomly selected twice. Now the bot should randomly select user3 again.

Thank you for your help.




Aucun commentaire:

Enregistrer un commentaire