Simple list.append() question

#VEDALA NARASIMHA KUMAR# PA0215481 at ntu.edu.sg
Tue Apr 25 02:02:52 EDT 2000


l=[]
i=0
while 1:
	if i <3:
		l.append([])
	else:break
	i=i+1
l[0].append(3)

 crude..but works 


On Mon, 24 Apr 2000, Bill Wilkinson wrote:

> l = [[][:]] * 3

No, this won't work.





More information about the Python-list mailing list