0 votes
in Python by
What Are The Different Methods To Copy An Object In Python?

1 Answer

0 votes
by

There are two ways to copy objects in Python.

copy.copy() function

It makes a copy of the file from source to destination.

It’ll return a shallow copy of the parameter.

copy.deepcopy() function

It also produces the copy of an object from the source to destination.

It’ll return a deep copy of the parameter that you can pass to the function.

Related questions

0 votes
asked May 23, 2020 in Python by sharadyadav1986
0 votes
asked May 17, 2020 in Python by SakshiSharma
...