What is the difference between `deepcopy` and `shallow copy`?

Answer Posted / nashiinformaticssolutions

• Shallow copy: Copies only the pointer, not the actual data.
• Deep copy: Creates a new memory allocation and copies the data.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name some commonly used built-in modules in python?

555


What is lambda in Python?

667


What is the use of enumerate() in python?

517


How will you check in a string that all characters are digits?

565


Mention what is flask-wtf and what are their features?

584






What is the python syntax for switch case statements?

583


What do you understand by the process of compilation and linking in python?

504


How does python handle memory management?

576


What is python in simple words?

541


Name some of the features of python?

575


Does xrange work python 3?

566


What should I make with python?

544


What does __ file __ mean?

546


Explain the use of with statement?

527


How will you remove a duplicate element from a list?

577