replace() actually returns a *copy* of the argument string with relevant parts replaced. The original string is left intact. Strings are immutable in Python.
As you can see, the replace method doesn't change the value of the string t1 itself. It just returns a new string that can be used for other purposes.
I hope this will clear your doubt.