human
Check if a string can be split into two substrings with equal number of vowels | Function to check if any character is a vowel or not.
Lowercase vowels.
Uppercase vowels.
Otherwise.
Function to check if string S can be split into two substrings with equal number of vowels.
Stores the count of vowels in the string S.
Traverse over the string.
If S [ i ] is vowel.
Stores the count of vowels upto the current index.
Traverse over the string.
If S [ i ] is vowel.
If vowelsTillNow and totalVowels are equal.
Otherwise.
Driver Code"
How can the above be solved in Python?

Write me a code to check if a string can be split into two substrings with equal number of vowels and the other steps required?
assistant
#Here is code to check if a string can be split into two substrings with equal number of vowels and the other steps required.
 def isVowel ( ch ) :
	if ( ch == ' a ' or ch == ' e ' or ch == ' i ' or ch == ' o ' or ch == ' u ' ) :
		return True
	if ( ch == ' A ' or ch == ' E ' or ch == ' I ' or ch == ' O ' or ch == ' U ' ) :
		return True
	return False
def containsEqualStrings ( S ) :
	totalVowels = 0
	for i in range ( len ( S ) ) :
		if ( isVowel ( S [ i ] ) ) :
			totalVowels += 1
	vowelsTillNow = 0
	for i in range ( len ( S ) ) :
		if ( isVowel ( S [ i ] ) ) :
			vowelsTillNow += 1
			totalVowels -= 1
			if ( vowelsTillNow == totalVowels ) :
				return " Yes "
	return " No "
if __name__ == " _ _ main _ _ " :
	S = " geeks "
	print ( containsEqualStrings ( S ) )