python错误提示:TypeError: 'builtin_function_or_method' object is not subscriptable

版权声明:转载请声明原文链接地址,谢谢! 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'
>>>

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42859280/article/details/84594444
今日推荐