我有一个存储已定义关键字的列表,例如: keywords = [ "tiger shark",
"funnel web spider","inland taipan"] 现在我做了一个句子 str = "A tiger shark spotted here, and a white shark, and a funnel web
我正在试着找出如何用字数来替换更长的句子(5个或更多的单词)。: numsentences = [len(sentence.split()) for sentence in s]
print(numsentences) 我得到了字数。但是我不知道如何让整个列表显示在包含4个或更少单词的句子出现的位置,而包含5个或更多单词的句子