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 trialAlan Stride
1,660 PointsStuck on 'Introducing Dictionaries' task, question 2 and 3 out of 4.
I know that the .items method allows you to cycle through the keys and values in a dictionary but in these questions it's only asking for what you would put in the code to get the key or the value, not both. Having reviewed the video it seems to only explain that you must write .items when you want both key and value, so I don't know the answer to the questions. Please reveal the answers
1 Answer
Phil Livermore
11,018 Points.keys() will give you the keys and .values() will give you the values.