def vowel_count(string):
vowels = ['a', 'e', 'i', 'o', 'u']
return len([i for i in string if i in vowels])
whatever=input("Enter something
")
vowels = ['a', 'e', 'i', 'o', 'u']
vowelp = ([i for i in whatever if i in vowels])
vowelcount = len([i for i in whatever if i in vowels])
print ("there are", vowelcount, "vowels (y is not counted)")
print ("the vowels are:", vowelp)
# Using dictionary and list comprehension
ip_str = 'Hello, have you tried our tutorial section yet?'
# make it suitable for caseless comparisions
ip_str = ip_str.casefold()
# count the vowels
count = {x:sum([1 for char in ip_str if char == x]) for x in 'aeiou'}
print(count)
# Program to count the number of each vowels
# string of vowels
vowels = 'aeiou'
ip_str = 'Hello, have you tried our tutorial section yet?'
# make it suitable for caseless comparisions
ip_str = ip_str.casefold()
# make a dictionary with each vowel a key and value 0
count = {}.fromkeys(vowels,0)
# count the vowels
for char in ip_str:
if char in count:
count[char] += 1
print(count)