5

So I did my research but I still cant figure out why Im getting this error:

TypeError: int is not callable

Heres my code:

count = []
for row in Matrix:
     count.append(row[0][0].Value)

results = map(int, count)    

print max(results)

count list contained a list of string ints, I converted these to pure ints and then I wanted to find the max number but I get the error.

what am I not seeing here?

btw, print min(count) works fine....

4

1 回答 1

10

您正在尝试在某处使用数字作为函数。

在您的程序的早期,您是否做过类似map = 6max = 6?如果是这样,您覆盖了mapormax函数,使它们无法使用。

要解决此问题,请更改变量名称的名称,以便它们不再覆盖内置函数。

于 2013-09-17T15:16:13.310 回答