Ask Your Question

# Revision history [back]

You can work in a polynomial ring.

sage: R.<a,b,c> = PolynomialRing(QQ)
sage: p = b * a + c * a + 3 * a + b + c
sage: p.coefficient(a*b)
1