By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,563 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

defining multi dimensional array

P: n/a
hi...

basic question..

how do i define a multi dimensional array

a[10][10]

is there a kind of a = array(10,10)

thanks

-bruce

Jul 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
bruce wrote:
basic question..

how do i define a multi dimensional array

a[10][10]

is there a kind of a = array(10,10)
It's just a list of lists.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Have you ever loved somebody / Who didn't know
-- Zhane
Jul 5 '06 #2

P: n/a

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.

Jul 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.