I want to delete i.e. character number 5 in a string. So I did:
del line[5]
and got: TypeError: \'str\' object doesn\'t support item deletion
So no I won
bytearray is a type which can be changed in place. And if you are using Python2.x, it can very easily convert to default str type: bytes.
b=bytearray(s) del b[5] s=str(b)