python - Overcoming the "disadvantages" of string immutability -
I want to change the value of a particular string index, but unfortunately
string [ 4] = "A" picks a TypeError
, because the wire is irreversible ("item assignment is not supported"). So instead I used the waste instead
string = string [: 4] + "a" + string [4:]
Is there any better way to do this?