index() 函数的功能与find() 函数类似,但当指定的字符串不存在时,index() 方法会抛出异常,而find() 函数则是返回-1。 Python index()函数详解. 语法. S.index(sub[, ...
確定! 回上一頁