Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Functions, Packing, and Unpacking Packing and Unpacking Unpacking Challenge

Michael Johnson
Michael Johnson
2,447 Points

I don't see how this is wrong.

My code works. I don't see why my code is wrong. Could someone, please, enlighten me. Thanks.

unpacking.py
def unpacker(*args):

    args = list(args)
    val1, val2 = args[0], args[1]
    return val1, val2

val = unpacker('Python', 'rocks!')

1 Answer

Steven Parker
Steven Parker
231,268 Points

Working or not, the code isn't doing what the instructions asked for.

They said, "Edit the variable assignment under the provided function...".   So you should not make any changes to the function itself, only to the bottom line.

Michael Johnson
Michael Johnson
2,447 Points

Thank you. Figured it out.