Content deleted Content added
Line 286:
:x[:] = [3, 2, 1]
:print y
It's also a bit awkward to say that Python variables "contain" values. Python variables actually ''bind'' names to values which isn't the same thing. Looked at that way, you can see that after y = x, y and x are different names bound to the same value. Mutating the object bound to x will naturally affect the object bound to y -- it's the same object. That list isn't contained in two different places, it just has two different names.--[[User:Quale|Quale]]
|