Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A suggestion.

import re
var('x y z r')
eqns = [x+y==1, x-z==0]
sol=solve(eqns,[x,y,z])[0]
S=str(sol)
eval(S.replace(re.search('r[0-9]+',S).group(),'r'))