I am trying to do a replace for something in a string. Here is the code I am testing:
stringT = "hello world"
print(stringT)
stringT.replace("world", "all")
print(stringT)
I would expect the second output to say 'hello all' but it says 'hello world' both times. There are no errors, the code runs fine, it just doesn't do anything. How do I fix this?