Word, word, word... Sorry for the title.
Let's say I want to replace every instance of "yes" to "no" in a string. I can just use string.replace(). But then there's this problem:
string = "yes eyes yesterday yes"
new_str = string.replace("yes", "no")
# new_str -> "no eno noterday no"
How can I preserve "eyes" and "yesterday" as is, with changing "yes" to "no".