Python Introducing Dictionaries Iterating and Packing with Dictionaries Recap of Iterating and Packing with Dictionaries

Alan Stride
Alan Stride
1,660 Points

Stuck 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
Phil Livermore
11,017 Points

.keys() will give you the keys and .values() will give you the values.