Complex Data Types in Python: Shallow & Deep Copies in Python


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

Explore copying operations on containers in Python in this 9-vdeo course, which examines the subtle distinction between shallow and deep copies. Changes made to shallow copies affect the original whereas with deep copies they do not. Learners begin by observing Jupyter notebook in Python, where you will be performing shallow and deep copies of Python strings. You will learn how to create shallow copies of lists, and then create deep copies of lists where changes to the copy do not affect the original. Following this, you will begin working with tuples, a process which you will discover is quite simple because tuples are immutable. So you will learn how to create shallow and deep copies of tuples. You will also learn how deep copies of dictionaries work, and perform shallow and deep copies of sets. In the closing exercise, learners are asked to recall how shallow and deep copies work for complex data types.



Expected Duration (hours)
0.8

Lesson Objectives

Complex Data Types in Python: Shallow & Deep Copies in Python

  • discover the key concepts covered in this course
  • perform shallow and deep copies of Python strings
  • create shallow copies of lists
  • create deep copies of lists where changes to the copy do not affect the original
  • perform shallow and deep copies of tuples
  • specify how shallow copies of dictionaries work
  • specify how deep copies of dictionaries work
  • perform shallow and deep copies of sets
  • recall how shallow and deep copies work for complex data types
  • Course Number:
    it_pycdpydj_03_enus

    Expertise Level
    Beginner