橘子味的心
标题:Python3 字符串String Index 方法

Python3 字符串String Index 方法

#!/usr/bin/python3

str1 = "this is string example....wow!!!"
str2 = "exam";

print (str1.index(str2))
print (str1.index(str2, 10))
print (str1.index(str2, 40))

目录

分类