python method to filter 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
python method to filter 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
Java program to delete vowels in a given string
// Java program to delete vowels in a given string
import java.util.*;
public class RemoveVowelsInString
{
public static void main(String[] args)
{
String str = "Deekshit Prasad";
System.out.println("Given string: " + str);
str = str.replaceAll("[AaEeIiOoUu]", "");
System.out.println("After deleting vowels in given a string: " + str);
}
}
how to remove vowels from a string in python
string = input("Enter any string: ")
if string == 'x':
exit();
else:
newstr = string;
print("\nRemoving 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);
remove vowels in a string python
# 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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us