Number of vowels in a string

# Number of vowels in a string

str1 = input("Enter string : ").strip()

vc = 0

vowels = "AEIOUaeiou"

for ch in str1:
if ch in vowels:
vc += 1

print("Total number of vowels in string are ", vc)

No comments:

Post a Comment

Don't be a silent reader...
Leave your comments...

Anu