mardi 10 octobre 2023

i used random.choice(words) earlier in my code and need to use the answer later how can i express it since i dont know which word it will generate yet [closed]

in my code i am using print(random.choice(words)) and need to compare whatever word it ends up being with another word however i do not know how to do this as i don't know what the randomly generated word will be yet, how can i out this into a new function? if i just input (random.choice(words) again will it be a different word? should i use a random variable to be equal to this but then will it not print my word?

i have not tried much yet as i am very new to code and afraid i will break whatever working code i have so far




Aucun commentaire:

Enregistrer un commentaire