Level 10 : What is the difference between a shallow copy and a deep copy in Python?

Author: IndraD | Tags: copy | 1736+ Python FAQs | Share
odd-number | gil | encapsulation | class | loop-control | feature | dictionaries | name-mangling | logical-operator | mutable | condition | fabs-function | list-vs-tuple | comprehension | binary-operation | zip | generators-in-python | exception-handling | syntaxerror | python | postfix | inherit | numpy | methods | __init_subclass__ | sorting | magic-method | floating-point-precision | swapping | exponentiation | range | matrix-list-comprehension | list-comprehension | nested-loop | max-min | operator-or | __all__-attribute | input | regex | access-modifier | asyncio | operators | recurssion | goto-function | boolean | statement | descriptors | compute | touples | functional-programming | data-structure | indentation | with-statement | invalid-list | asyncio-module | identity-operator | comparison | identifier | python-django | call | typeerror | staticmethod | complex | yield | file_handling | string | comment | import-method | mapping-function | zip-function | docstring | global | higher-order-function | assignment-operator | data_structure | function-and-scope | map-function | python-module | tuple-unpacking | string-method | function | id-function | factorial-function | string-concatenation | type-conversion | list-comprehension | deep-copy | design-principle | virtual-environment | center | enumerate() | math | parameter | loops | object-attribute | int | namedtuple | multithreading | while-else-loop | def | min-function | counter-function | dicts | error-handling | keyword | method | lists | random | bitwise | datatype | set-operation | update | command-line-parsing | list-indexing | conditional-statement | expand-tab | numeric | logical-operation | python_version | mysql | string-formatting | global-keyword | operations | benefit | string-slicing | string-method | pickling-&-unpickling | virtual-environment | shallow-copy | thread | slicing | print-statement | assert | filter | operator-and | return-statement | attribute | recursion | random-function | threading | installation | formal-and-actual-parameter | default-mutable-argument | loop | datetime | round-function | precedence-and-associativity | version | destructor | while-loop | memory | immutability | exception-handling | math-copysign | mathematics | type_conversion | built-in | __future__ | generators | heap-memory | indexing | library | software-design | inheritance | python-history | global-variable | syntax-error | implementation | polymorphism | counter | control-statement | zfill-function | data-structures | class-and-instance-variable | rollback | context-manager | match | input-function | class-and-inheritance | oop | collection | global-variable | syntax-error | boolean-and-non-boolean | namespace | slice | encoding | list-join | precedence | matplotlib | tuple | raise | exception | head-and-tail | pseudocode | variable | functions | print | sum-function | class-and-object | min-max-function | memory-management | generator | copy | decimal | arithmetic-operation | escape-operator | scientific-notation | multiple-inheritance | data-structure | list-operation | filter-function | lambda-function | error | debugging | format | control-flow | application | function-argument | string-manipulation | split | array | built-in-function | operator | lambdas | python-repl | complex-number | integer | list-method | string-formatting | file-handling | data-type | bitwise-operator | objects | identity-operator | lambda | list-slicing | string-iteration | operand | round | frozenset | iterator | control-flow | module | collections | overflow | decorator | async | classes | choice | version-check | sum() | constructor | basic | mathematical-function | data-type | while-and-for-loop | package-management | matrix | init | pandas | list-mutation | expression | logical-operator | sys | sorted | immutable-data-type | static-method | iterable | input-function | turtle | conditional-statement | pep | else-statement | dictionary | operator-overloading | join | oops | file-handling | file | stack | string-slicing | set | built-in-function | binary | interpreter | conversion | list | multiprocessing | arithmetic-expression | append | syntax | sys-module | type-conversion | for | regular-expression | bitwise-operator ...