Python implementation of polynomials.