bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Python/Foundations
Python•Foundations

Python - Copy Dictionaries

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind Python - Copy 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?

2Order

Put the learning moves in the order that makes the concept easiest to apply.

Another way to make a copy is to use the built-in function dict() .
There are ways to make a copy, one way is to use the built-in Dictionary method copy() .
You cannot copy a dictionary simply by typing dict2 = dict1 , because: dict2 will only be a reference to dict1 , and changes made in dict1 will automatically also be made in dict2 .

Copy a Dictionary

You cannot copy a dictionary simply by typing dict2 = dict1 , because: dict2 will only be a reference to dict1 , and changes made in dict1 will automatically also be made in dict2 .

There are ways to make a copy, one way is to use the built-in Dictionary method copy() .

copy()

Another way to make a copy is to use the built-in function dict() .

dict()

Previous

Python - Loop Dictionaries

Next

Python - Nested Dictionaries