For say if I have a paragraph and I wanna find and replace certain words in it with one certain word.
And I'm trying to do this using a for loop, after defining my word list.
Here's my code
script = """ In this sense, netting can represent , which gives Howie return on Zachary."""
ROE = ["In", "this"] #the word list I'm defining (the list of words I want it replaced)
for ROE in script:
script.replace(ROE, "ROE")
#desired output = ROE ROE sense, netting can represent , which gives Howie return on Zachary.
It doesn't really work, can someone help me fix it?