def equation_checker(equation):
    '\n    Check equation for balanced parentheses\n\n    Args:\n       equation(string): String form of equation\n    Returns:\n       bool: Return if parentheses are balanced or not\n    '
    opening_parenthesis = Stack()
    closing_parenthesis = Stack()
    for _ in equation:
        if (_ == '('):
            opening_parenthesis.push(_)
        elif (_ == ')'):
            closing_parenthesis.push(_)
    return (opening_parenthesis.size() == closing_parenthesis.size())
Check equation for balanced parentheses

Args:
   equation(string): String form of equation
Returns:
   bool: Return if parentheses are balanced or not
def equation_checker(equation):
    '\n    Check equation for balanced parentheses\n\n    Args:\n       equation(string): String form of equation\n    Returns:\n       bool: Return if parentheses are balanced or not\n    '
    opening_parenthesis = Stack()
    closing_parenthesis = Stack()
    for _ in equation:
        if (_ == '('):
            opening_parenthesis.push(_)
        elif (_ == ')'):
            closing_parenthesis.push(_)
    return (opening_parenthesis.size() == closing_parenthesis.size())