我正在寻找方法来查找列表中适合值的所有文本: 例如:
words =['a', 'ball','hello']
# No. of text: 1 2 3 4
texts= ["i'm need a answer", "Hi daddy", "hello world", "I love to dance ballet"]
预期结果:
我尝试使用循环(从文本中的单词中搜索单词,但没有成功)
非常感谢你的帮助
Python 3:
您可以在空白处拆分文本以隔离单词。使用拆分文本和单词的交叉点查找重叠部分。下面的此函数用于筛选具有与声明的词集重叠的词集的文本
相关问题 更多 >
编程相关推荐