Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind Python - Loop Dictionaries?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ x in thisdict:3Order
Put the learning moves in the order that makes the concept easiest to apply.
When looping through a dictionary, the return value are the keys of the dictionary, but there are methods to return the values as well.
You can loop through a dictionary by using a for loop.
Loop Through a Dictionary
Loop Through a Dictionary
You can loop through a dictionary by using a for loop.
When looping through a dictionary, the return value are the keys of the dictionary, but there are methods to return the values as well.
Example
for x in thisdict:
print(x)Example
for x in thisdict:
print(thisdict[x])values()keys()items()