On May 11, 5:05 am, alefajnie <[EMAIL PROTECTED]> wrote: > > try arr[2][3] instead. > > > basically your version is trying to index an array with a tuple argument > > (2,3). > > > --irmen > > oh, you're right. > > btw, is any simple way to create multi-dimension array ? > any built-in function ?
it is not clear that two-dim arrays are faster than hashes in all implementations of Python, or in every general language, or if they're the right symbol for your program. >>> a= { } >>> a[ 0, 1 ]= True >>> a[ 4, 0 ]= True >>> a[ 0, 1 ] True however, this one: >>> a[ 2, 1 ] results in a KeyError. do you want a particular thing, or are you on the clock? if you want to define 'blanks', that takes time too. is it initally empty? -- http://mail.python.org/mailman/listinfo/python-list