python get index of item in list if exists