12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import random
- prefixe1 = "MONO-"
- prefixe2 = "UNI-"
- prefixe3 = "ANTI-"
- prefixe4 = "SUB-"
- prefixes = [prefixe1, prefixe2, prefixe3, prefixe4]
- print (prefixes)
- phrase = "And that which spites me more than all these wants- He does it under name of perfect love"
- print("1ere réplique:", phrase)
- nouvelle_phrase = []
- mots = phrase.split()
- print(mots)
- for mot in mots:
- prefixe =random.choice(prefixes)
- print("prefixe aléatoire:", prefixe)
- nouveau_mot= prefixe+mot
- print(nouveau_mot)
- nouvelle_phrase.append(nouveau_mot)
- print(nouvelle_phrase)
- print("phrase mono-", " ".join(nouvelle_phrase))
|