Created
August 6, 2022 07:31
-
-
Save aashish-chaubey/e0809deec5833d9ebcd0565710cbb277 to your computer and use it in GitHub Desktop.
Count all the vowels in the name and show count of each of them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
name = "Aashish Chaubey" | |
vowels = "aeiou" | |
vowels_list = list(filter(lambda x: x in vowels, name.lower())) | |
print(f"Number of vowels in name is: {len(vowels_list)}") | |
print(dict(Counter(vowels_list))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment