mon programme :
texte = input("Texte ?")
if "entreprise" in texte:
print(texte.replace("entreprise","société",))
else:
print("Mot non trouvé")
if "fonctionne" in texte:
print(texte.replace("fonctionne","marche bien"))
else:
print("Mot non trouvé")
La sortie :
Texte ? mon entreprise fonctionne
mon société fonctionne
mon entreprise marche bien
Process finished with exit code 0
et moi j'aimerais que ça me sorte "mon société marche bien" 