求Python,明天就考试了

str1 = "Runoob example....wow!!!"

str2 = "exam";

Print(str1.find(str2, 5))
这个打印出来为啥是8

结果确实为 7。str1.find(str2, 5) 的意思是在 str1 字符串的第 5 个位置开始找 str2。str1 中第一个字符下标是 0,exam 的第一个字符出现在下标 7 的位置。

应该是7啊,

exam 在 "Runoob example....wow!!!"的第7个位置

str1 = "Runoob example....wow!!!"
str2 = "exam"
print(str1.find(str2, 5))

结果为:7

你确定str1串没有输错吗?怎么数也是7啊