Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You could try with passing a dictionary to the .subs() method:

sage: def test(f,myvar,myval):
sage:    return f.subs({myvar:myval})

sage: print(test(f,x,3))
9