我有一个子字符串:
substring = "please help me out"
我还有另一个字符串:
string = "please help me out so that I could solve this"
如何查找是否substring
是string
使用Python 的子集?
用in
:substring in string
:
>>> substring = "please help me out"
>>> string = "please help me out so that I could solve this"
>>> substring in string
True
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句