#!/usr/bin/python3 str1 = "Runoob example....wow!!!" str2 = "exam"; print (str1.find(str2)) print (str1.find(str2, 5)) print (str1.find(str2, 10))
不存在:则返回-1 存在:返回索引值