Write a Python program which takes a string as an input, then counts and display the occurrence of words starting with a vowel in the given string.
[[ topic Strings in Python]]
❌DO NOT SPAM❌
Answers
Answered by
0
Answer:
In this program, we need to count the number of vowels present in a string and display those vowels. This can be done using various methods. In this article, we will go through few of the popular methods to do this in an efficient manner.
Examples:
In a simple way
Input : Geeks for Geeks
Output :
5
['e', 'e', 'o', 'e', 'e']
This is in a different way
Input : Geeks for Geeks
Output : {'u': 0, 'o': 1, 'e': 4, 'a': 0, 'i'
Answered by
0
Answer:
The string count() method returns the number of occurrences of a substring in the given string. In simple words, count() method searches the substring in the given string and returns how many times the substring is present in it.
Similar questions