热线电话:13121318867

登录
2021-03-24 阅读量: 556
python报错TypeError: ' int’object is not callable

问:

python报错TypeError: ' int’object is not callable

image.png


答:

这是因为在调用print()函数前,将print赋值为整数1,整数不是函数无法进行调用,因此会报错,解决方法是先用del删除误定义的变量print,再使用print()进行调用:

image.png

59.9593
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子