Python lists are mutable. All mutable objects will behave in the fashion you described, whereas immutable objects -- tuples, integer, floats, etc. -- will behave in the fashion that you expect.
This is because python keeps references to objects. When you say bb = aa, you are really saying, "Take the reference to the list 'aa' and copy it to 'bb' so that when you use the variable bb you are just using the a copy of the original reference to the *same* object." Here's another gotcha: s = [[]]*100 #Thinking that you can initialize a hundred lists easily s[0].append(1) #Add something to the first list And, oh crap, it added a one to all of the lists. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor