| 1 | initial version |
Instead of passing variables[0] as the name of an argument, you can pass a dictionary as an argument of subs method:
sage: R.<x,y> = PolynomialRing(QQ,2)
....: f = x^2+y^2
....: variables = [x,y]
....: f.subs({variables[0]:1})
y^2 + 1
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.