python delete second character from string code example Example: delete character between index S = S.replace(S.substring(b_index, e_index), "");