0

I am curious about whether it is possible to define a function that can take any number of parameters in Python. Thank you for your help.

1 Answers1

2

You can use *args or **kwargs

See this article for more in depth information about that.


EDIT

@Dash also mentioned this great answer from Peter Hoffmann on this subject

Adam Boinet
  • 521
  • 8
  • 22
  • 1
    I would also mention this question on SO: https://stackoverflow.com/questions/36901/what-does-double-star-asterisk-and-star-asterisk-do-for-parameters – Dash Jul 02 '20 at 15:49