In case anyone stumbles upon this question, in addition to Stephen's answer here, there's a link that gives excellent explanations to questions regarding the topic of mutations in python :
www-inst.eecs.berkeley.edu/~selfpace/cs9honline/Q…
Also I've asked this question over on stackoverflow and got some interesting answers as well. Here's an edit I added to my original question over there to summarize the answers :
-In python mutating operations are explicit
-The addition or multiplication operator performed on list objects creates a new object, and doesn't change the list object implicitly
[Both of these "facts" are the reasons why alist=alist+[5] won't mutate alist, whereas alist+=[5] will]
I could also add:
-"Every time you use square brackets to describe a list, that creates a new list object"
[this from : www-inst.eecs.berkeley.edu/~selfpace/cs9honline/Q… ]
Also I realized after Kabanus' answer how careful one must be tracking mutations in a program :
l=[1,2]
z=l
l+=[3]
z=z+[3]
and
l=[1,2]
z=l
z=z+[3]
l+=[3]
Will yield completely different values for z. This must be a frequent source of errors isn't it?
I'm only in the beginning of my learning and haven't delved deeply into OOP concepts just yet, but I think I'm already starting to understand what the fuss around functional paradigm is about...