I have a function which returns multiple values, can I use that function somehow directly in another function's argument list? When I try it (naively) I get:
def one() :
return 3, 2
def two(a, b):
return a + b
two(one())
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-86-27980b86a2c0> in <module>()
3 def two(a, b):
4 return a + b
----> 5 two(one())
TypeError: two() missing 1 required positional argument: 'b'
Of course I can do something like
def one() :
return 3, 2
def two(a, b):
return a + b
a, b = one()
two(a, b)