转自https://python-china.org/t/1152
def solve(eq, var):
eq1 = eq.replace("=", "-(") + ")"
c = eval(eq1, {var: 1j})
return -c.real / c.imag