Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Like that ?

P.<C> = PolynomialRing(QQ)
P(g[0].rhs())

A basic example:

sage: P = PolynomialRing(QQ,'x')
sage: type(x)
<type 'sage.symbolic.expression.Expression'>
sage: P(x**3+4)
x^3 + 4
sage: type(P)
<class 'sage.rings.polynomial.polynomial_ring.PolynomialRing_field_with_category'>