First time here? Check out the FAQ!
answered 2019-12-18 22:48:16 +0100
Sure, you can do something like this:
def poly_from_coeffs(coeffs, x): return sum(c*x^k for (k,c) in enumerate(reversed(coeffs)))
Example:
sage: poly_from_coeffs([2, 0, 2, 7], x) 2*x^3 + 2*x + 7