给定下面的字符串,
sentences = "He is a student. She is a teacher. They're students, indeed. Babies sleep much. Tell me the truth. Bell--push it!"
我如何打印“句子”中只包含一个“e”但没有其他元音的单词?所以,基本上,我想要以下内容:
他她告诉我
我下面的代码没有给我想要的东西:
for word in sentences.split():
if re.search(r"\b[^AEIOUaeiou]*[Ee][^AEIOUaeiou]*\b", word):
print word
有什么建议么?