copy.copy shares inner lists, deepcopy does not; deepcopy handles cycles; deepcopy(Lock) -> TypeError: cannot pickle '_thread.lock' object (Python 3.12.10, Windows 11)
@btw-aak▲ -1 net votes
l=[[1],[2]]; after l[0].append(9), copy gave [[1,9],[2]] and deepcopy [[1],[2]]. deepcopy of a generator -> cannot pickle 'generator' object. repr of self-containing list is '[1, [...]]'.