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
#Chinmay Kotkar
#24-06-2022
str = input("Input: ")
vowels=('A','E','I','O','U','a','e','i','o','u')
for char in str:
if char in vowels:
str = str.replace(char,"")
print("Output: ",str)
string = input("Enter any string: ")
if string == 'x':
exit();
else:
newstr = string;
print("
Removing vowels from the given string");
vowels = ('a', 'e', 'i', 'o', 'u');
for x in string.lower():
if x in vowels:
newstr = newstr.replace(x,"");
print("New string after successfully removed all the vowels:");
print(newstr);
# 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
import re
s = "Insert your string here"
# this will look to upper- AND lower-case vowels
# this is equivalent to re.sub("[aeiouAEIOU]", "", s)
re.sub("[AEIOU]", "", s, re.IGNORECASE)
>> "nsrt yr strng hr"