replace a character with a string in python code example
Example 1: python change character in string
mytext = 'Hello Zorld'
mytext = mytext.replace('Z', 'W')
print mytext,
Example 2: python replace string
string.replace(old, new, count)
mytext = 'Hello Zorld'
mytext = mytext.replace('Z', 'W')
print mytext,
string.replace(old, new, count)