set char string python code example Example: python change character in string mytext = 'Hello Zorld' mytext = mytext.replace('Z', 'W') print mytext,