Computer Science, asked by amisha342492, 10 days ago

wap to find total number of vowels, digits and other characters in string ? ( in python )​

Answers

Answered by madhurane78
0

Answer:

How to count the vowels in a string in Python

a_string = "Abcde"

  1. lowercase = a_string. lower() Convert to lowercase.
  2. vowel_counts = {}
  3. for vowel in "aeiou":
  4. count = lowercase. count(vowel) Count vowels.

vowel_counts[vowel] = count. Add to dictionary.

  1. print(vowel_counts)
Similar questions