3
def func1(arg1,arg2,arg3,arg4)
    ...

def func2(arg5,arg6)
    return a,b,c,d

func1(func2(arg5,arg6))

Can I call func1(func2(arg5,arg6)) like this?? as func2 will return 4 items that'll be passed to func1

PM 2Ring
  • 54,345
  • 6
  • 82
  • 182

1 Answers1

11

You would have to unpack the arguments, but yes you can do that using the * operator.

func1(*func2(arg5,arg6))
Cory Kramer
  • 114,268
  • 16
  • 167
  • 218
  • i upvoted your answer though the same question asked yesterday and got marked as duplicate , both links are provided but still nice answer +1 – Pavneet_Singh Oct 25 '16 at 12:09