wap to find total number of vowels, digits and other characters in string ? ( in python )
Answers
Answered by
0
Answer:
How to count the vowels in a string in Python
a_string = "Abcde"
- lowercase = a_string. lower() Convert to lowercase.
- vowel_counts = {}
- for vowel in "aeiou":
- count = lowercase. count(vowel) Count vowels.
vowel_counts[vowel] = count. Add to dictionary.
- print(vowel_counts)
Similar questions