Showing posts with label Number of vowels in a string. Show all posts
Showing posts with label Number of vowels in a string. Show all posts

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)