找到串串蟒蛇
>>> str = "Messi is the best soccer player"
>>> "soccer" in str
True
>>> "football" in str
False
蟒蛇串找到
The find() method returns the index of first occurrence of the substring
(if found). If not found, it returns -1.
message = 'Python is a fun programming language'
# check the index of 'fun'
print(message.find('fun'))
# Output: 12