Even though you can manipulate a string to create a new string the original string is immutable which means that they never change. Notice that after you execute the code below the string stored in the variable sentence hasn’t changed.
While the strings themselves can’t be changed you can change the value of a variable. This throws away the original string and sets the variable’s value to the new string.
We can reassign a variable to hold the result of calling a function on a string. On line 3 of the example below, we make the new value of sentence be the result of changing the old value of sentence after it was changed to lowercase.
Strings are immutable, meaning they don’t change. Any function that changes a string returns a new string. So s1 never changes unless you set it to a different string.