s ="Liu Dana love Wang Xiaojing and Zhang Xiaojing"
s1 ="Xiaojing"# 第一次发现这个子字符串的位置,从0开始,后面还有也不管了
s.find(s1)# 指定范围查找,从20开始查找,看能否找到了
s.find(s1,20)# 返回-1表示没有找到
s2 ="Wanwan"
s.find(s2)# 确定查找的开始位置和结束位置
s ="hello world"
s.find("o",5,7)# 返回结果为-1
str内置函数help(str.find)字符串查找类find,查找字符串中是否包含一个子串,找不到就返回-1s = "Liu Dana love Wang Xiaojing and Zhang Xiaojing"s1 = "Xiaojing"# 第一次发现这个子字符串的位置,从0开始,后面还有也不管了s.find(s1)# 指定范围查找,从20开始查找,看能否找到了s....