Python program to counting consonants in a given word example

11/25/2023
All Articles

Python program counting consonants in a given word example

 Python program to  counting consonants in a given word example

 Python program to  counting consonants in a given word



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)

Conclusion

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.

 

Article