samedi 14 août 2021

How can I avoid getting the same values from two different random variables but the value comes from the same list?

name = ("Joe", "Henry", "Jack", "Reyna", "Sage", "Jette", "Kayo")

ran_name1 = random.choice(name)

ran_name2 = random.choice(name)

print(ran_name1) print(ran_name2)

#Henry #Henry

How can I avoid the above same values from two different random variables?




Aucun commentaire:

Enregistrer un commentaire