How I can get the index of an element contained in the list?