import random
welcomes = ["Hello","Hi","What's up","YO", "Piss off"]
chosen = random.choice(welcomes)
print("You have entered the welcome cave ----- {} -----".format(chosen))
How do I make sure that Hello for example isn't repeated twice in a row? It's fine if they're repeated again later, just not straight after.
Aucun commentaire:
Enregistrer un commentaire