如果在字符串中找到列表项,则获取该项python
if any(x in string_to_search for x in listThat_contains_x):
print(x)
如果单一项目是发现串获得该项目的蟒蛇
if any(x in string_to_search for x in listThat_contains_x):
print(x)
如果检查一词包含一个字在一个列表中的蟒蛇
if any(word in 'some one long two phrase three' for word in list_):
检查word是否包含列表中的单词
if any(word in 'some one long two phrase three' for word in list_):