lundi 10 décembre 2018

In Python, is there a way to turn a random.choice into a variable? [duplicate]

This question already has an answer here:

list = ["okay", "nokay", "sokay"]
print = (random.choice(list))

If I do this in python, is there a way to retrieve the random choice? To store the last random choice from that list as a variable that I can use in a print or and if statement?




Aucun commentaire:

Enregistrer un commentaire