Replace two characters in the middle of a string
S = 'abcdefghijk' S = S[:3] + 'xx' + S[5:] # Slice sections from S print( S )