Pop() function in python

It returns the index of the “item” in the array of the “items”. Since it wasn`t documented that i could use the pop function in this way i tried to find a way to get the index of the item in the array. (i find it from here: http://discourse.codecombat.com/t/getnearest-result-cant-be-used-with-indexof/819/2)

I am guessing that you mean items.pop(item) . Still the same error. It removes the last element.

What i am trying to achieve is to remove the “item” from the array of the “items”, so the next peasant won`t go to the same item in the greed level. So, if i am not wrong, the item variable and the poped variable should be equal, but that is not the case.

Thanks in advance