Driver Code
if __name__ == " _ _ main _ _ " : s1 = " ) ( ) ( ( ) ) ) ) " NEW_LINE INDENT s2 = " ( ( ) ( ( ) ( " NEW_LINE if isBalancedSeq ( s1 , s2 ) : NEW_LINE INDENT print ( " Balanced " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Not ▁ Balanced " ) NEW_LINE DEDENT DEDENT