Boo*_*d16 5 python list max typeerror python-2.7
所以我做了我的研究,但我仍然无法弄清楚为什么我得到这个错误:
TypeError: int is not callable
继承我的代码:
count = []
for row in Matrix:
count.append(row[0][0].Value)
results = map(int, count)
print max(results)
Run Code Online (Sandbox Code Playgroud)
count列表包含一个字符串整数列表,我将这些转换为纯整数然后我想找到最大数字,但我得到了错误.
我在这里看不到什么?
顺便说一句,print min(count)工作正常....
Mic*_*x2a 10
你试图在某个地方使用数字作为函数.
在你的程序早些时候,你这样做map = 6还是max = 6?如果是这样,你覆盖了map或者max功能,使它们无法使用.
要解决此问题,请更改变量名称的名称,以便它们不再覆盖内置函数.