given:
def psum(a,b,c):
return a**b+c
and x = [1,2]
and y = 3
how can I do psum(*x,3)
--> an equivalent.
I do not want to do x[0], x[1]
because a function returns x
and calling it twice would be inefficient. Could one do z = function(a)
. where z = x
. and then do z[0]
, z[1]
.
But I'm wondering if one can do this otherwise and use positional arguments in such a way.
Also, without using a wrapper.
Edit: One cannot use names because I didn't implement the function and the function writers did not use named arguments :/