In a string python how to change the value of a substring?