首先官方解释 S.index(sub[, start[, end]]) -> int Like S.find() but raise ValueError when the substring is not found. S.find(sub[, start[, end]]) -> int Return the lowest index in S where substring sub is found, such that sub is contained within S[start:en…