Use slicing to extract those parts of the original string to be kept s = s[:position] + replacement + s[position+length_of_replaced:] ...
確定! 回上一頁