Click here to Skip to main content
15,883,647 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Let's say there's a list

vowels = ['a', 'e', 'i', 'o', 'u']
x = raw_input("Enter something?")


Now how to find instances of these vowels in the x?

.find won't work.

What I want to do is to stop at the first instance of vowel and modify it as such that x becomes characters of the word that user inputted minus the vowel and what followed after the vowel.

For example if user inputted "tree", then x should be modified such that x becomes "tr"

another example:
"flower" will become "fl"
Posted
Comments
Sergey Alexandrovich Kryukov 18-Nov-14 9:35am    
No, .find() does work, but you need to call it for all vowels.
—SA
Member 11243554 18-Nov-14 13:28pm    
Yes but it will then just print out the position of all instance of vowel. How can I stop at the first instance of vowel and print x until the first vowel comes up?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900