Python program to counting consonants in a given word example
Python program counting consonants in a given word example
vowel = ['a', 'e', 'i', 'o', 'u']
word = "Developer Indian programming"
count = 0
for character in word:
if character not in vowel:
count += 1
print(count)
The idea behind the Python programme to count the vowels or consonants in a given string will be covered in this article.
This article will teach you how to use the Python programming language to count the vowels and consonants in a given string.