Python String Replace method with examples
The replace() method is responsible for substituting one phrase for another. If nothing else is supplied, all occurrences of the specified phrase are substituted. replace() is a Python built-in function that returns a string copy with all occurrences of a substring replaced with another substring.