在Python3中关于下列字符串程序运行结果为?
str1 = "exam is a example!" str2 = "exam" print(str1.find(str2, 7))
help(str.find) Help on method_descriptor: find(...) 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:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
帮助(str.find) 关于method_descriptor的帮助: 寻找(...) S.find(sub[, start[, end]]) -> int 返回 S 中找到子字符串 sub 的最低索引, 使得 sub 包含在 S[start:end] 中。 可选的 参数 start 和 end 被解释为切片表示法。 失败时返回 -1。