DEV Community

sankar
sankar

Posted on

#program to remove vowels from given string

string = "PrepInsta"

vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
result = ""

for i in range(len(string)):
if string[i] not in vowels:
result = result + string[i]

print("\nAfter removing Vowels: ", result)

Output:

After removing Vowels: Prpnst

Top comments (0)