1 | initial version |
I would do it this way:
sage: z = var('x y')
sage: zvals = (1, 2)
sage: w(x,y)=x^2+y^2
Note that w explicitly lists the order of arguments...
sage: w(*zvals)
5
Python documentation of the *mylist syntax is here.
Here is another way:
sage: w(1,2)
5
sage: w(x=zvals[0], y=zvals[1])
5