(expr)
return eval_(ast.parse(expr, mode='eval').body)
>>> eval_expr('2^6')
    4
    >>> eval_expr('2**6')
    64
    >>> eval_expr('1 + 2*3**(4^5) / (6 + -7)')
    -5.0
>>> eval_expr('2^6')
    4
    >>> eval_expr('2**6')
    64
    >>> eval_expr('1 + 2*3**(4^5) / (6 + -7)')
    -5.0
>>> eval_expr ( 2^6 ) 4 >>> eval_expr ( 2 ** 6 ) 64 >>> eval_expr ( 1 + 2 * 3 ** ( 4^5 ) / ( 6 + - 7 ) ) - 5 . 0
def eval_expr(expr):
    """
    >>> eval_expr('2^6')
    4
    >>> eval_expr('2**6')
    64
    >>> eval_expr('1 + 2*3**(4^5) / (6 + -7)')
    -5.0
    """
    return eval_(ast.parse(expr, mode='eval').body)
def eval_expr ( expr ) : return eval_ ( ast . parse ( expr , mode = 'eval' ) . body )