- 问题:
-
我在找一个
字符串。包含
或字符串索引
方法我想做的是:
if not somestring.contains("blah"):
continue
- 答案:
-
你可以使用
in
operator公司名称:if "blah" not in somestring:
continue
Python 学与思 – 学 Python,不浅尝辄止
我在找一个字符串。包含
或字符串索引
方法
我想做的是:
if not somestring.contains("blah"):
continue
你可以使用in
operator公司名称:
if "blah" not in somestring:
continue