copy(Shallow and deep copy operations) copy — Shallow and deep copy operations — Python 3.7.4rc2 documentation copy — Shallow and deep copy operations Source code: Lib/copy.py Assignment statements in Python do not copy objects, they create bindings between a target and an object. For collections that are mutable or contain mutable items, a copy is sometimes needed docs.python.org
import dis dis.dis('a = [1, 2, 3, 4]') """ 0 LOAD_CONST 0 (1) 2 LOAD_CONST 1 (2) 4 LOAD_CONST 2 (3) 6 LOAD_CONST 3 (4) 8 BUILD_LIST 4 10 STORE_NAME 0 (a) 12 LOAD_CONST 4 (None) 14 RETURN_VALUE """ dis(Disassembler for Python bytecode) dis — Disassembler for Python bytecode — Python 3.7.4rc2 documentation dis — Disassembler for Python bytecode Source code: Lib/dis.py The dis module supports the a..