(expr)
Rule to unpack singleton args

    >>> from sympy.strategies import unpack
    >>> from sympy import Basic
    >>> unpack(Basic(2))
    2
Rule to unpack singleton args
Rule to unpack singleton args
def unpack(expr):
    """ Rule to unpack singleton args

    >>> from sympy.strategies import unpack
    >>> from sympy import Basic
    >>> unpack(Basic(2))
    2
    """
    if len(expr.args) == 1:
        return expr.args[0]
    else:
        return expr
def unpack ( expr ) : if len ( expr . args ) == 1 : return expr . args [ 0 ] else : return expr