I have a sentence like this:
sentence = "it is a stupid book and a stupid hat and a stupid computer"
and I want to replace the word "stupid" with the word "silly". And create a sentence for each replacement.
The result is something like this:
"it is a silly book and a stupid hat and a stupid computer"
"it is a stupid book and a silly hat and a stupid computer"
"it is a stupid book and a stupid hat and a silly computer"
I mean the creating just 3 sentences each one for each replacement.
I found the method replace() in Python but the count parameter determines the number of replacements not the one that I want. Could anyone help me?