Hi Mikie, On Thu, Jun 18, 2009 at 1:17 AM, William Stein<[email protected]> wrote: > > On Wed, Jun 17, 2009 at 5:14 PM, Mikie<[email protected]> wrote: >> >> I taking a string from a form. How do I convert it to polynomial type? > > sage: R.<x> = ZZ[] > sage: R > Univariate Polynomial Ring in x over Integer Ring > sage: R(s) > x^3 + 3*x - 2
Or something like the following: sage: s = "x^3 + 3*x - 2"; type(s) <type 'str'> sage: R.<x> = ZZ["x"]; R Univariate Polynomial Ring in x over Integer Ring sage: R(s) x^3 + 3*x - 2 -- Regards Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
