python edit string code example
Example 1: python edit string variable
text = 'abcdefg'
new = list(text)
new[6] = 'W'
''.join(new)
Example 2: python change character in string
mytext = 'Hello Zorld'
mytext = mytext.replace('Z', 'W')
print mytext,