how to change string in a variable string ? python code example Example: python edit string variable text = 'abcdefg' new = list(text) new[6] = 'W' ''.join(new)