1def anti_vowel(c):
2 newstr = c
3 vowels = ('a', 'e', 'i', 'o', 'u')
4 for x in c.lower():
5 if x in vowels:
6 newstr = newstr.replace(x,"")
7
8 return newstr
9
1#include <stdio.h>
2int check_vowel(char);
3int main()
4{
5char s[100], t[100];
6int c, d = 0;
7gets(s);
8for(c = 0; s[c] != ‘\0’; c++)
9{
10if(check_vowel(s[c]) == 0)
11{
12t[d] = s[c];
13d++;
14}
15}
16t[d] = ‘\0’;
17strcpy(s, t);
18printf(“%s\n”, s);
19return 0;
20}
21int check_vowel(char ch)
22{
23if (ch == ‘a’ || ch == ‘A’ || ch == ‘e’ || ch == ‘E’ || ch == ‘i’ || ch == ‘I’ || ch ==’o’ || ch==’O’ || ch == ‘u’ || ch == ‘U’)
24return 1;
25else
26return 0;
27}
28
1# removing vowels in a string
2def anti_vowel(c):
3 newstr = c
4 vowels = ('a', 'e', 'i', 'o', 'u')
5 for x in c.lower():
6 if x in vowels:
7 newstr = newstr.replace(x,"")
8
9 return newstr