Loading, please wait...

Count Vowels

To count numberof vowels

 

Code:

vowels = 'aeiou'
ip_str = 'Hello, have you tried our turorial section yet?'
ip_str = ip_str.casefold()
count = {}.fromkeys(vowels,0)
for char in ip_str:
   if char in count:
       count[char] += 1
print(count)

 

Then, Click on the run button to execute it.