python if in list return index