python TypeError: ‘xxx‘ object is not callable问题解决

问题描述

运行python程序提示TypeError: ‘xxx’ object is not callable,如下
在这里插入图片描述
在这里插入图片描述

问题分析

出现该问题的原因是因为函数名称重复的原因,往往是function = function()导致;

解决方式

解决方式,重新命名一下等号左侧的函数名称,保证唯一性(比如改一下大小写)
在这里插入图片描述
再次编译
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Xu_Huitong/article/details/129302211