Variable assignment and modification (in python) [duplicate]
Memory management in Python involves a private heap memory location containing all Python objects and data structures. Python’s runtime only deals in references to objects (which all live in the heap): what goes on Python’s stack are always references to values that live elsewhere. >>> a = [1, 2] >>> b = a >>> a.append(3) …