do i need to import anything for this.. or is it supposed to work out of the
box..

and just what is it doing!!!!!

-bruce


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of tac-tics
Sent: Tuesday, July 04, 2006 9:53 PM
To: python-list@python.org
Subject: Re: defining multi dimensional array



bruce wrote:
> hi...
>
> basic question..
>
> how do i define a multi dimensional array
>
>  a[10][10]

I find that list comprehensions are useful for this.

[ [None for x in xrange(10)] for y in xrange(10)]

You could easily write a wrapper for it to clean the syntax a bit.

--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to