from sympy import * var('x') y = x*x print(solve(y-1, x)) """ >>> box% python -i main.py [-1, 1] >>> """