如何检查数组中的任何字符串是否存在于另一个字符串中?
喜欢:
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"
该代码不起作用,只是为了展示我想要实现的目标.
python arrays string exists
arrays ×1
exists ×1
python ×1
string ×1