Thanks Meenu.
str.translate.
Worked like a charm for python 3.5.
And thanks Alan Gauld for the 2.7 version.
Appreciate the help guys. You guys are awesome.
Regards
Vusa
On Wed, Oct 28, 2015 at 6:23 PM, meenu ravi wrote:
> Hi Vusa,
>
> I was not able to reply
On 28/10/2015 18:06, Alan Gauld wrote:
On 28/10/15 17:35, Peter Otten wrote:
Alan Gauld wrote:
On 28/10/15 16:37, Peter Otten wrote:
'The cow moos louder than the frog'.translate(str.maketrans("", "",
"aeiouAEIOU"))
'Th cw ms ldr thn th frg'
Even easier, forget the maketrans stuff and
Hi Guys,
I've written a script to remove vowels from a string/sentence.
the while loop I'm using below is to take care of duplicate vowels found in
a sentence, ie
anti_vowel('The cow moos louder than the frog')
It works, but obviously its messy and n00by. Any suggestions on how I can
write
On Wed, Oct 28, 2015 at 10:09 AM, Vusa Moyo wrote:
> Hi Guys,
>
> I've written a script to remove vowels from a string/sentence.
>
> the while loop I'm using below is to take care of duplicate vowels found in
> a sentence, ie
>
> anti_vowel('The cow moos louder than the frog')
>
On Wed, Oct 28, 2015 at 11:09 AM, Zachary Ware
wrote:
>assert remove_vowels('Did It work? Looks like.') == 'Dd t wrk? Lks Lke.'
Of course I typo'd here (that's what you get for not testing!): there
should be no final 'e' and the last 'L' should be lower-case.
Vusa Moyo wrote:
> I've written a script to remove vowels from a string/sentence.
>
> the while loop I'm using below is to take care of duplicate vowels found
> in a sentence, ie
>
> anti_vowel('The cow moos louder than the frog')
>
> It works, but obviously its messy and n00by. Any
On 28/10/15 16:37, Peter Otten wrote:
'The cow moos louder than the frog'.translate(str.maketrans("", "",
"aeiouAEIOU"))
'Th cw ms ldr thn th frg'
Even easier, forget the maketrans stuff and just use
'The cow moos louder than the frog'.translate(None,'aeiouAEIOU')
--
Alan G
Author of the
On 2015-10-28 09:37, Peter Otten wrote:
Vusa Moyo wrote:
I've written a script to remove vowels from a string/sentence.
the while loop I'm using below is to take care of duplicate vowels
found
in a sentence, ie
anti_vowel('The cow moos louder than the frog')
It works, but obviously its
On 28/10/15 17:35, Peter Otten wrote:
Alan Gauld wrote:
On 28/10/15 16:37, Peter Otten wrote:
'The cow moos louder than the frog'.translate(str.maketrans("", "",
"aeiouAEIOU"))
'Th cw ms ldr thn th frg'
Even easier, forget the maketrans stuff and just use
'The cow moos louder than the
Alan Gauld wrote:
> On 28/10/15 16:37, Peter Otten wrote:
>
> 'The cow moos louder than the frog'.translate(str.maketrans("", "",
>> "aeiouAEIOU"))
>> 'Th cw ms ldr thn th frg'
>
> Even easier, forget the maketrans stuff and just use
>
> 'The cow moos louder than the
Alex Kleider wrote:
> On 2015-10-28 09:37, Peter Otten wrote:
>> Vusa Moyo wrote:
>>
>>> I've written a script to remove vowels from a string/sentence.
>>>
>>> the while loop I'm using below is to take care of duplicate vowels
>>> found
>>> in a sentence, ie
>>>
>>> anti_vowel('The cow moos
On 2015-10-28 08:09, Vusa Moyo wrote:
Hi Guys,
I've written a script to remove vowels from a string/sentence.
the while loop I'm using below is to take care of duplicate vowels
found in
a sentence, ie
anti_vowel('The cow moos louder than the frog')
It works, but obviously its messy and
On Wed, Oct 28, 2015 at 11:09 AM, Zachary Ware
wrote:
>return ''.join(c for c in text if c not in vowels
Looking again, I see I typo'd here too. There should of course be a
')' at the end.
--
Zach
___
Tutor
13 matches
Mail list logo