📜  删除字符串中的元音python代码示例

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

代码示例2
# removing vowels in a string
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