版权声明:转载请声明原文链接地址,谢谢! https://blog.csdn.net/weixin_42859280/article/details/84594444
[]
换成
()
>>> yy.replace['a','s']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'builtin_function_or_method' object is not subscriptable
>>> yy.replace('a','s')
'sbcdef'
>>>