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.
I'm having an issue with unpacking.
Edit the variable assignment under the provided function so that the tuple returned from the function call is unpacked into 2 variables, val1, val2
def unpacker(*args): return args val = unpacker('Python', 'rocks!')
Steven Parker210,850 Points
A cool feature of Python not found in most languages is the ability to assign more than one variable at a time. So when the instructions say the return from the function should be "unpacked into 2 variables", they just mean to list both variables on the left side of the assignment:
val1, val2 = unpacker('Python', 'rocks!')
Were you born this rude or did you come by it over time. I have tried this problem and watched the videos a few time. That's why I posted for help. Next time you decide to be rude don't bother posting.