| 1 | initial version |
The simplest solution is just to use dictionary arguments for subs.
Instead of
for counter in range(1,n):
f = f.subs(var('x' + str(counter))=counter)
which throws a SyntaxError, you can write
for counter in range(1,n):
f = f.subs({var('x' + str(counter)):counter})
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.