This question already has an answer here:
- Store function result into variable 3 answers
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