Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import Counter
- def vowelcount(word):
- return sum(dict([i for i in dict(Counter(word.lower())).items() if i[0] in 'aeiou']).values())
- #alternatively
- import re
- vk = lambda w: len(re.sub('[^aeiouAEIOU]| ','',w))
- print vowelcount("HOLY SHIT IN THE NAME OF DICKS")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement