I have this Mathematica (output) vector that I'd like to convert to Python:
{{k[0],-o[3] k[10]-o[2] k[13]-k[19]+k[13] x[4]+k[13] x[5]+k[10] x[6]+k[10] x[7]+k[10] x[8]+k[13] x[9]+k[13] x[10]+k[10] x[11],0,0,k[13] x[1],k[13] x[1],k[10] x[1],k[10] x[1],k[24]+k[10] x[1],k[13] x[1],k[26]+k[13] x[1],k[10] x[1]},{-k[0]-k[17],0,0,0,k[3],k[5],0,0,0,0,0,0}}
I want the variables to stay the same, unlike InputForm
, that converts e.g. k[1]
to StringForm["k[``]", 1]
; plus, I want the implicit multiplications (e.g. k[13] x[5]
) to appear with an asterisk.
I don't mind the brackets, I've found a function that solves this last problem.
Thanks in advance! :)