index ()函数用于检测字符串中是否包含子字符串str。语法:str.index(str, beg=0, end=len(string)),如果包含子字符串返回开始的索引值,否则抛出异常。
確定! 回上一頁