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 trialLewis Cowles
74,902 Pointstwoples quiz
To extract a dictionary use (well "items" seems fine to me, I have tried it using the items() and items), not sure if you want it written as a function, do you want some code, a picture from google, first-born child... the question is so insanely poorly worded its impossible to tell.
To unpack tuples, again assignment?, are you looking for the key-word in-place? are you looking for a function?, you used more than one in the video. If it helps my code around tuples works... Perhaps the question could be re-worded... I have passed the rest of the course, its this one pain in the ass question, which is really IMHO unhelpful, I have watched your video 3-4 times and I have not seen the key-words jumping out at me
2 Answers
Kenneth Love
Treehouse Guest TeacherHey Lewis Cowles! First off, thanks for speaking up. Are there any suggestions you have for improving the question? I definitely don't want people to struggle just because a question is worded strangely.
Lewis Cowles
74,902 PointsHi Kenneth,
I think I suggested
"Dictionaries use the following to unpack when using string.format( __x ). Tuples use the alternative string.format( __x )."
I think this really small change would have made me go, oh...
Please do bear in mind I use Python alongside other languages a fair bit, so if the terminology is killing me, it might be cooking others, or I could be an idiot lol
Kenneth Love
Treehouse Guest TeacherI've changed the question to something closer to your suggestion. Let's see how it does!
Thanks for the input, Lewis Cowles
Lewis Cowles
74,902 PointsLewis Cowles
74,902 Pointsfound the answer... it definitely needs explaining better...
"Dictionaries use the following to unpack when using string.format( __x ). Tuples use the alternative string.format( __x )."
Spoiler alert
Dictionaries = ** Tuples = *