Skip to content Skip to sidebar Skip to footer

Typeerror: 'list' Object Is Not Callable

I can't find the problem i'm facing... this is exactly what the error tells me: File 'C:/Users/Rodrigo Villalta/Desktop/listasparimpar.py', line 38, in listas_par_impar if lis

Solution 1:

In this line:

if lista2(m) > lista2 [m+1]:

… you've written lista2(m) instead of lista2[m].

This means you're trying to call lista2 like a function, with argument m. What you wanted to do is index lista2 like a list, with index m.

Solution 2:

if lista2(m) > lista2 [m+1]:

Should be:

if lista2[m] > lista2 [m+1]:

Post a Comment for "Typeerror: 'list' Object Is Not Callable"