Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One of many, MANY possible solutions to this:

sage: solve(x^2-4==0,x, solution_dict=True)
[{x: -2}, {x: 2}]
sage: [ sol.values()[0] for sol in solve(x^2-4==0,x, solution_dict=True) ]
[-2, 2]

There isn't really an easy way to do this without programming, because the solution types can vary a lot. In the one-variable case this should be one reasonable way, though.