Hi I wanted to understand why there is an asterisk in the parameter of the function. It it doing something? It looks like its allowing a list as the argument of the function, instead of just a single variable.
It is a wildcard placeholder for undetermined number of arguments. There can be only one in the parameter list, and it must come last.
(some, thing, *splat)
Thank you for clarifying, thats what I was thinking
You’re welcome. This is something to experiment with in your own console or in a sandbox.
Consider that optional arguments might still apply.
(some, thing=False, *splat)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.