python 字符串是否包含某个子字符串

方法如下:以后再整理

if str1 in str2:

  包含的话,True

if str1.find(str2)>=0:

  包含的话,返回第一次出现的位置,没有的话为负数

https://www.cnblogs.com/wq242424/p/6524697.html

原文地址:https://www.cnblogs.com/beforeluck-shang/p/8317620.html