Solve equations in Python.