📌  相关文章
📜  python3 元音和辅音过滤器 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:29.578000             🧑  作者: Mango

代码示例6
def getVowels(text):

vowel_letters = []
vowel_list = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U',]

for vowels in text:
    if vowels in vowel_list:
        vowel_letters.append(vowels)

return vowel_letters

print(getVowels('Hi, How are you today!'))
## Output: ['i', 'o', 'a', 'e', 'o', 'u', 'o', 'a']