String Substitution Function

  • Share this:

Code introduction


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)                
              
Tags: