Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Python Shallow Copy And Deep Copy

Sometimes while programming, in order to prevent having side effects when we want to change an object, we need to create a Copy of that object and mutate the copy so that we can later use the original. Python provides methods that we can use to do this. In this post, I will describe the shallow copy and deep copy methods of python that you can effectively use to copy objects even recursively.

@emeka_david



This post first appeared on SOLVING IT?, please read the originial post: here

Share the post

Python Shallow Copy And Deep Copy

×

Subscribe to Solving It?

Get updates delivered right to your inbox!

Thank you for your subscription

×