Search
The .replace() method in Python, allows us to replace a word within a string. If the word is not found, no text is replaced and the original text is returned. Note that, .replace() replaces all occurences of the word with the replacement word.
.replace()