📜  将列表中的字符串替换为另一个字符串 python 代码示例

📅  最后修改于: 2022-03-11 14:45:40.570000             🧑  作者: Mango

代码示例1
string = 'pythonhxamples'
position = 6
new_character = 'e'

string = string[:position] + new_character + string[position+1:]
print(string)

#output: pythonexamples