Python-检查另一个字符串中是否存在多个字符串
发布于 2021-02-02 23:22:24
如何检查数组中的任何字符串是否在另一个字符串中?
喜欢:
a = ['a', 'b', 'c']
str = "a123"
if a in str:
print "some of the strings found in str"
else:
print "no strings found in str"
该代码行不通,只是为了展示我想要实现的目标。
关注者
0
被浏览
134