I wish to create a list of empty lists and then put something in one of the empty lists. Below is what I tried, but instead of appending 1 to a[2] it was appended to all the sub-lists in a. What am I doing wrong?
a = 6*[[]] >>> a [[], [], [], [], [], []] >>> a[2].append(1) >>> a [[1], [1], [1], [1], [1], [1]] >>> -- http://mail.python.org/mailman/listinfo/python-list