我尝试过以下方法。
我想知道如何打印包含重复单词的整个句子(们)。
import re
sentences = "Glitches happened happened happened. Things go back to normal again."
print([re.findall(r"(\w+)\s\1", s) for s in sentences.split('.')])
我想知道如何打印包含重复单词的整个句子(们)。