>>> a = [1,2,3,4,5]
Max function gives TypeError: 'int' object is not callable
>>> max(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>> max(1, 2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>>
maxbefore.1()you will get the same error. Because max is shadowed by a int variable you created as bereal stated.