Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- vowels = '[aeiouAEIOU]'
- def countVowels(sentence):
- found_vowels = re.findall(vowels, sentence)
- return len(found_vowels)
- if __name__ == "__main__":
- sentence = 'HEllo'
- print(countVowels(sentence))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement