What does *p mean in method declaration def my_func(*p) in Python?
Explanation
This notation allows developers to pass variable number of values into function. In this case p is a list that contains all of them. This method can be called like this, for example, my_func(1, 2, 3)

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes