1 | initial version |
Or you can set the solution_dict to True:
sage: solve(qe, x, solution_dict=True)
[{x: 379}, {x: 239}]
sage: solve(qe, x, solution_dict=True)[0][x]
379
sage: solve(qe, x, solution_dict=True)[1][x]
239
Vincent
2 | No.2 Revision |
Or you can set the solution_dict to True:
sage: solve(qe, x, solution_dict=True)
[{x: 379}, {x: 239}]
sage: solve(qe, x, solution_dict=True)[0][x]
379
sage: solve(qe, x, solution_dict=True)[1][x]
239
EDIT: as mentioned in comments, the output are not integers but element of the symbolic ring. In order to get integers the fastest is
sage: a = solve(qe, x, solution_dict=True)[0][x]
sage: a.pyobject()
379
Vincent