sage: sage0("var('a b c')")
(a, b, c)
sage: sage0("a = b/c")

b
                                       -
                                       c


On Mon, Dec 22, 2008 at 9:03 AM, Georg Muntingh
<[email protected]> wrote:
>
> A quick question: If one is given a variable name as a string s, how
> can one assign a symbolic expression to it? Here is what I try that
> doesn't work:
>
> var('a b c')
> s = "a"
> eval(s + " = b/c")
>
> Traceback (most recent call last):
>      ...
>    a = b/c
>      ^
> SyntaxError: invalid syntax
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to