相关疑难解决方法(0)

替代python字符串项目分配

使用python字符串的项目分配的最佳/正确方法是什么?

s = "ABCDEFGH" s[1] = 'a' s[-1]='b'

正常方式将抛出: 'str' object does not support item assignment

python string

25
推荐指数
2
解决办法
5万
查看次数

标签 统计

python ×1

string ×1