[Solved] Why are python lists not local
Well, technically, you’re right in that the piano variable is local. However, it still points to the same internal reference as pizza. This is what’s happening behind the scene: You allocate a new list of values, and a variable named pizza is created so you can refer to it: pizza -> [ 1 , 2 … Read more