Click any inner sub-list to mutate it — only that variable's list changes.
Click a nested sub-list above to mutate it.
How it works under the hood
deepcopy() walks the entire object graph recursively. Every inner list — and every object inside those lists — is allocated as a brand-new object with its own memory address. After a deepcopy, there is no shared state between a and c at any level.
# Verify with id() — every address is different
id(a) == id(c) # False — new outer list
id(a[0]) == id(c[0]) # False — new inner lists too!
One caveat
deepcopy() is slower and uses more memory — it copies everything recursively. If your inner lists only contain immutable items (integers, strings, tuples), a shallow .copy() is always safe because immutables can't be mutated anyway.