如何确定子字符串是否在不同的字符串中[重复]

2024-06-03

我有一个子字符串:

substring = "please help me out"

我还有另一个字符串:

string = "please help me out so that I could solve this"

我如何找到如果substring是一个子集string使用Python?


with in: substring in string:

>>> substring = "please help me out"
>>> string = "please help me out so that I could solve this"
>>> substring in string
True
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何确定子字符串是否在不同的字符串中[重复] 的相关文章

随机推荐