You can download this code by clicking the button below.
This code is now available for download.
This function is used to replace a specified substring in a string with a new substring.
Technology Stack : String
Code Type : String Handling Function
Code Difficulty : Beginner
def string_replace(old, new, string):
return string.replace(old, new)