So I already know how to remove a index like this:
i = "hello!"
i= i[:0] + i[1:]
print(i)
'ello!'
But how do I replace it?
So maybe I wanted to now put a H where the old h was but if I do this:
i[0] ="H"
I get this error:
Traceback (most recent call last): File "<pyshell#2>", line 1, in i[0] ="H" TypeError: 'str' object does not support item assignment
How do I fix this?