Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind Python - Change Dictionary Items?
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.
___ = {3Order
Put the learning moves in the order that makes the concept easiest to apply.
The argument must be a dictionary, or an iterable object with key:value pairs.
The update() method will update the dictionary with the items from the given argument.
You can change the value of a specific item by referring to its key name:
Change Values
You can change the value of a specific item by referring to its key name:
Example
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict["year"] = 2018Update Dictionary
The update() method will update the dictionary with the items from the given argument.
The argument must be a dictionary, or an iterable object with key:value pairs.
update()