human
Longest substring of vowels | Python3 program to find the longest substring of vowels ..
Increment current count if s [ i ] is vowel.
check previous value is greater then or not.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to longest substring of vowels and the other steps required.
 def isVowel ( c ) :
	return ( c == ' a ' or c == ' e ' or c == ' i ' or c == ' o ' or c == ' u ' )
def longestVowel ( s ) :
	count , res = 0 , 0
	for i in range ( len ( s ) ) :
		if ( isVowel ( s [ i ] ) ) :
			count += 1
		else :
			res = max ( res , count )
			count = 0
	return max ( res , count )
if __name__ == " _ _ main _ _ " :
	s = " theeare "
	print ( longestVowel ( s ) )