1 | initial version |
I would re-evaluate whether using strings is really what you want to do; probably whatever problem you have can be solved in a better way. Nevertheless, it is possible:
function('P')
var('x1 x2 x3 y1 y2 y3')
st = eval('y1,0,1')
sum(P(x1,y1,y2,y3),*st)