Boosted_d16 Boosted_d16 - 1 year ago 66
Python Question

TypeError: int is not callable

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:

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?

print min(count)
works fine....

Answer Source

You're trying to use a number as a function somewhere.

Earlier in your program, did you do something like map = 6 or max = 6? If so, you overrode either the map or max function(s), making them unusable.

To fix this, change the names of the variable names so they no longer overwrite the builtins.