Count Vowels in a String

Count Vowels in a String
Hello World!
Total : 1 Discussion
Login
Anto
    
#Count Vowels in a String str1="Hello World!" count = 0 vowel_list = ["a","e","i","o","u","A","E","I","O","U"] for i in str1: if i in vowel_list: count = count + 1 print(count) I have used the above code and all the test cases i tried are throwing correct results but here it shows failed, kindly check into this
Reply