Hello everyone , I meet you again , I'm your friend, Quan Jun .
Indicates that the string string All characters in are a The replacement of is b.
string = "abcabcabc"
string = string.replace('a','b')
print(string)
bbcbbcbbc
i,s = 0,'b'
string = "abcabcabc"
string = list(string)
string[i] = s
print(''.join(string))
bbcabcabc
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/133815.html Link to the original text :https://javaforall.cn