0

How do i do that

I need to create a funkcion which would return a word without a vovels. Ex. if there is a word naaAmed it would return nmd. And it would include input()

26th Nov 2018, 3:35 PM
Leaf
Leaf - avatar
6 Answers
+ 1
Tank you. I was doing something similar but i was mising something.
26th Nov 2018, 5:29 PM
Leaf
Leaf - avatar
+ 5
Try to code it first. You won't learn unless you try. But I will give you clues on how to do it. Create a list containing all the vowels. Then loop over the word, if it's a vowel then replace it with "".
26th Nov 2018, 4:23 PM
Lambda_Driver
Lambda_Driver - avatar
+ 5
There is also an easier way of solving this using join method
26th Nov 2018, 4:45 PM
Lambda_Driver
Lambda_Driver - avatar
26th Nov 2018, 5:21 PM
Lambda_Driver
Lambda_Driver - avatar
+ 4
Try this code. def h(s): x=['a','e','i','o','u'] n='' for i in s: if(i not in x): n+=i return n print(h('man')) #output=mn Next try yourself good luck.
26th Nov 2018, 4:51 PM
Maninder $ingh
Maninder $ingh - avatar
+ 4
No problem. Happy coding! 😀
26th Nov 2018, 6:22 PM
Lambda_Driver
Lambda_Driver - avatar