Hey, @Nelson,
replace() actually returns a *copy* of the argument string with relevant parts replaced. The original string is left intact. Strings are immutable in Python.
t1="xyz"
t2=t1.replace("x", "X")
print(t1) #xyz
print(t2) #Xyz
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.