Ask Your Question

Revision history [back]

Like this:

sage: expr = x^2
sage: expr.operator() == operator.pow
True
sage: expr.operands()
[x, 2]