The string.replace() is deprecated on python 3.x. What is the new way of doing this?
Try this:
mystring = "This Is A String" print(mystring.replace("String","Text"))