so I have some code like the following:
def _step_1(a, b, c):
some codes
return d, e, f
def _step_2(d, e, f, a, b):
some codes
return g
def _run_all(a, b, c):
g = _step_2(_step_1(a, b, c), a, b)
return g
And it is telling me that I am missing two arguments "a" and "b". Could someone tell me if I did anything wrong by trying to save some steps? Or there is no way to save steps? I know I can definitely write like this:
def _run_all(a, b, c):
d, e, f = _step_1(a, b, c)
g = _step_2(d, e, f, a, b)
return g
_step_2(). Even though the result of_step_1(a,b,c)contains three elements, it is itself just a tuple. As @U9-Forward answered, if you're using Python 3, you can automatically unpack that result into its three separate values.