Sign up to request clarification or add additional context in comments.
Comments
0
You can create a dictionary of data that you want to replace
message ="I want to cry"
change_word={"cry":"fly","want to":"will"}
for key,value in change_word.items():
message=message.replace(key,value)
print(message)