【Python报错记录-- TypeError: ‘builtin

【Python报错记录-- TypeError: ‘builtin,第1张

TypeError: ‘builtin_function_or_method’ object is not subscriptable
问题描述

犯了个错误,代码如下:

finished_sandwiches.append[sandwich_order]


原因分析:

append 是函数,不应使用[ ],应使用()


解决方案:

修改为()后解决

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/943671.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-18
下一篇2022-05-18

发表评论

登录后才能评论

评论列表(0条)

    保存