Your code would be almost the same, if you rewrote it in Python.
from math import pi, sin, tan, cos from scipy.optimize import fsolve def equations(x): rad = pi / 180; l1 = 150.210355; s1 = -38.913290; d1 = -11.185833; l2 = 180.308440; s2 = -14.878290; d2 = 14.545555; l3 = 223.495977; s3 = 20.492543; d3 = -8.679444; l1 = l1 * rad; s1 = s1 * rad; t1 = tan(d1 * rad); l2 = l2 * rad; s2 = s2 * rad; t2 = tan(d2 * rad); l3 = l3 * rad; s3 = s3 * rad; t3 = tan(d3 * rad); return (sin(x[0]+s1)-tan(x[2]+l1)*(cos(x[0]+s1)* sin(x[1])- t1* cos(x[1])), sin(x[0]+s2)-tan(x[2]+l2)*(cos(x[0]+s2)* sin(x[1])- t2* cos(x[1])), sin(x[0]+s3)-tan(x[2]+l3)*(cos(x[0]+s3)* sin(x[1])- t3* cos(x[1]))) fsolve(equations, [10 * pi / 180, 50 * pi / 180, 0])
Output:array([2.61799394e-01, 6.45771810e-01, 1.20245548e-08])
Note: It is not pythonic way to use ;
to separate statements, so, it is desirable to rewrite each assignment in a new line.