First post from a Python newbiw

Steve Turner ilkeston at ntlworld.com
Sun Mar 2 09:32:33 EST 2008


Marc 'BlackJack' Rintsch wrote: 

: On Sun, 02 Mar 2008 14:15:09 +0000, Steve Turner wrote:
: 
:: Apart from doing something like
:: a=[0,0,0]
:: b=[0,0,0]
:: c=[0,0,0]
:: d=[a,b,c]
:: 
:: is there a better way of creating d??
: 
: a = [[0] * 3 for dummy in xrange(3)]

Thanks, Marc.

-- 
Steve




More information about the Python-list mailing list