Function that returns true if the equation is valid
def isValid ( string ) : NEW_LINE INDENT k = 0 ; NEW_LINE operands = [ " " ] * 5 ; NEW_LINE operators = [ " " ] * 4 ; NEW_LINE ans = 0 ; ans1 = 0 ; ans2 = 0 ; NEW_LINE for i in range ( len ( string ) ) : NEW_LINE DEDENT