[Tutor] Initializing a list as an array

Scott syrinx@simplecom.net
Fri, 7 Dec 2001 19:14:00 -0600


Hello.

Suppose I want to initialize a list that I want to use like an array, setting 
the initial value of each element to zero.  Is there a more efficient way to 
do this than something like:

x = []
for i in range(10):
	x.append(0)

Thanks.