All about Deep Copy and Shallow Copy in Python

In Python, there are broadly three kinds of copy.First using the assigment operator. Second, shallow copy and third, deep copy. In this article we shall dive deep into different kinds of copy that we have in Python. Using Assignment operator(=): When we copy a variable(list,dict),mutable type, The Python interpreter just refers to  the same memory location using a different varriable name. Therefore any operation we do either on the original or on the copied variable(newly assigned), both of them get affected. Cell 61: shows the id of both the variable are same. Cell 62: when one element is changed, it

Read More