First time here? Check out the FAQ!
answered 2015-03-30 18:01:47 +0100
You could try with passing a dictionary to the .subs() method:
.subs()
sage: def test(f,myvar,myval): sage: return f.subs({myvar:myval}) sage: print(test(f,x,3)) 9