Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Functions, Packing, and Unpacking Packing and Unpacking Recap of Packing and Unpacking

leo homssi
leo homssi
3,742 Points

plz kan some one help me, i cant get it right:( the only one that i have trubble with is the one that i have to fill in

i cant pass this quiz

leo homssi
leo homssi
3,742 Points

i forgot to add the quiz:" Functions, Packing, and Unpacking"

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 67,736 Points

The key to the fill in question is to realize inside the function is a reference to args. This must be defined somewhere. Since the parameter list is the only available place, args must go there. However, it can be seen that the function is called with multiple arguments. The way to specify that a parameter can accept multiple arguments is to prefix the parameter with an asterisk (*). The asterisk will cause the multiple arguments to be packed into a tuple. Hence, the parameter list should be *args

Post back if you need more help. Good luck!