pre [ i ] will store the count of vowels in the substring str [ 0. . . i ]
pre = [ 0 for i in range ( len1 ) ] NEW_LINE if ( isVowel ( str1 [ 0 ] ) ) : NEW_LINE INDENT pre [ 0 ] = 1 NEW_LINE DEDENT else : NEW_LINE INDENT pre [ 0 ] = 0 NEW_LINE DEDENT