Solution:
I figure out you want
listb.pop()[0]
The expression listb.pop
is a valid python expression which results in a reference to the pop
method, however doesn't really call that method. You require to include the open and close parentheses to call the method.
You used []
instead of ()
at the time attempting to call append
.
Seems like you typed brackets instead of parenthesis by mistake.
You are attempting to access pop as in case was a list or a tupple, however pop is not. It's a method.
instead of writing listb.pop[0]
write
listb.pop()[0]
^
|
This error arises at the time you don't use brackets with pop
operation. Write the code in this manner.
listb.pop(0)
or You can attempt this code
featIndex = featLabels.index(firstStr)