Remove consonants in an sentences



Problem to remove the consonants in an string. Without vowels are consonants.



Example-1:


Input    : S = "mycrazycoding"
Output   : aoi  
Explain  : Remove consonants characters (m,c,r,z,d,n,g).


Example-2:


Input    : S = "helloworld"
Output   : eoo  
Explain  : Remove consonants characters (h,l,w,r,d).   







Solution




n = "mycrazycoding"

a = "aeiou"

d = ""

for i in range(len(n)):

    if(n[i] in a):

        d += n[i]

print(d)



Output



aoi