DEV Community

Discussion on: Daily Challenge #3 - Vowel Counter

Collapse
 
highcenburg profile image
Vicente G. Reyes

Python

def vowel(str): 
    count = 0
    vowels = set("aeiouAEIOU") 
    for alphabet in str: 
        if alphabet in vowels: 
            count = count + 1
    print("No. of vowels :", count) 
str = "The Practical Dev"
vowel(str)