-1

I can do:

myfun(a=1, b=2,c=3,d=4)
myfun(a=2, b=2,c=3,d=4)
myfun(a=1000, b=2,c=3,d=4)

But is there a way to store b,c,d and pass just one object to the function? Changing the value to any of b,c,d is costly, since I need to change it in many places.

I want something like this pseudocode:

args = (b=2, c=3, d=4)
myfun(a=1, **args)
safex
  • 2,398
  • 17
  • 40

1 Answers1

1

Your pseudocode is close to be true:

args = dict(b=2, c=3, d=4)
myfun(a=1, **args)