📜  python方法过滤字符串中的元音 - Python代码示例

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

代码示例1
def anti_vowel(c):
    newstr = c
    vowels = ('a', 'e', 'i', 'o', 'u')
    for x in c.lower():
        if x in vowels:
            newstr = newstr.replace(x,"")

    return newstr