Say I have this:
greet = "hello world"
and I want to change the letters in this variable to something else.
Why does
greet = "g".join("hello world")
work, if strings are meant to be immutable?
print(greet)
hgeglglgog gwgogrglgd
Say I have this:
greet = "hello world"
and I want to change the letters in this variable to something else.
Why does
greet = "g".join("hello world")
work, if strings are meant to be immutable?
print(greet)
hgeglglgog gwgogrglgd