Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT exp1 = " ( ( ( ) ) ) ( ) ( ) " NEW_LINE if ( isBalanced ( exp1 ) ) : NEW_LINE INDENT print ( " Balanced " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Not ▁ Balanced " ) NEW_LINE DEDENT exp2 = " ( ) ) ( ( ( ) ) " NEW_LINE if ( isBalanced ( exp2 ) ) : NEW_LINE INDENT print ( " Balanced " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Not ▁ Balanced " ) NEW_LINE DEDENT DEDENT