You have a few options when declaring a function to accept many arguments
- accept a wildcard list of
*args
- pass in the argument as a list
foo(arg1, [arg2])
If you mean passing in all the args to a function set up to accept 5 (or any number), as @Paul M notes, you can unpack the arguments to a function with *
This also works for named arguments, but you might use **kwargs to accept and ** to unpack from a dictionary
>>> "{a} {c} {a}".format(**{'a':1, 'b':2, 'c': 3})
'1 3 1'
NOTE the names args and kwargs are by-convention, but choosing something else may cause confusion