Articles → Python → Replace function in python

Replace function in python






Purpose





Example


message = "this was the message"

message = message.replace("was", "is")

print(message)



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, May 15, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250