我试着用标识符把'Hi‘和'Hello’连在一起
投入:
ankur="Hi"
yash="Hello"
print(ankur, yash)输出(错误):
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-41-733bc20e4385> in <module>()
1 ankur="Hi"
2 yash="Hello"
----> 3 print(ankur, yash)
TypeError: 'tuple' object is not callable发布于 2022-07-01 12:32:10
你用的是一个笔记簿。在以前的或删除的单元格中,您已经将print函数重新定义为元组。尝试只输入没有括号的print,以查看它的值。
要解决这个问题,只需重新启动内核即可。
输入
type(print)输出
<class 'tuple'>https://stackoverflow.com/questions/72829232
复制相似问题