0

I want to find vowels that occurring more than one time.....but it doesn't work. What's the error...

https://code.sololearn.com/cA6g1JXClOZa/?ref=app

27th Oct 2019, 11:28 AM
Muralikrishnan
Muralikrishnan - avatar
6 Answers
+ 3
Is it necessary to use re module ? I think it is not worth it using modules when learning a language, especially when can do easily do it without them, you can write a simple function for that in a couple of lines, and it will be much more beneficial that just remembering more syntax and not understanding it fully. Try not to use re module, but if you still want to use it I can't help because I don't have time to search for how it works, sorry. Here is a function I tried to make as simple as possible: https://code.sololearn.com/cvAvpvTeSAf3/?ref=app Here is a shroter version using the bulltin str.count : https://code.sololearn.com/cdvCV7PFRZ1f/?ref=app
27th Oct 2019, 12:05 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
It's because your code finds the sequence of vowels, any two vowels next to each other will be removed, and are considered a sequence, which is why 'io' is the only one being removed. Try to think of a better solution now that you know where the problem is
27th Oct 2019, 11:45 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
What do you mean by find ? The number of times a letter is repeated ? Or their positions ? Or what, can please give examples of inputs and output, because I have no idea what the code should do
27th Oct 2019, 11:29 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
INPUT : CONDITION OUTPUT : CNDTN O and I are more than one time hence it is removed
27th Oct 2019, 11:33 AM
Muralikrishnan
Muralikrishnan - avatar
0
I want to remove it... Vowels that occurring more than one time
27th Oct 2019, 11:30 AM
Muralikrishnan
Muralikrishnan - avatar
0
But my code only remove second occurance what's the error
27th Oct 2019, 11:31 AM
Muralikrishnan
Muralikrishnan - avatar