How do I modify a single character in a string, in Python?

前端 未结 4 1814
傲寒
傲寒 2020-12-16 13:54

How do I modify a single character in a string, in Python? Something like:

 a = \"hello\"
 a[2] = \"m\"

\'str\' object does not support ite

4条回答
提交回复
热议问题