I want to replace only specific word in one string. However, some other words have that word inside but I don't want them to be changed.
For example, for the below string I only want to replace x
with y
in z
string. how to do that?
x = "the"
y = "a"
z = "This is the thermometer"