x,y = symbols('x,y')

y = x**3
y.subs(x,5)
125

x = 5
y.subs(x,x)
x**3
y.subs(x,10)
x**3
y.subs(x,3)
x**3

x = 3
y.subs(x,125)
x**125
y.subs(x,10)
x**10

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/85388ffd-b3aa-485a-bd00-7aebcff4d5cf%40googlegroups.com.

Reply via email to