Another way to do it is using a dict with keys that are tuples:
>>> arr = {}
>>> arr[0,0] = 'a1'
>>> arr[0,1] = 'a2'
>>> arr[1,0] = 'b1'
>>> arr[1,1] = 'b2'
>>> arr[2,0] = 'c1'
>>> arr[2,1] = 'c2'
>>> for j in range(3):
... for i in range(2):
... print arr[j,i], ' ',
... print
...
Sybren Stuvel wrote:
> Bruno Desthuilliers enlightened us with:
>
>>Python has lists (which AFAIK really are arrays not linked lists,
>>but they are called 'lists').
>
>
> An array is generally understood as a list of items of the same type,
> hence Python lists aren't arrays.
A list is general
Sybren Stuvel <[EMAIL PROTECTED]> wrote:
> Bruno Desthuilliers enlightened us with:
> > Python has lists (which AFAIK really are arrays not linked lists,
> > but they are called 'lists').
>
> An array is generally understood as a list of items of the same type,
> hence Python lists aren't arrays.
Sybren Stuvel wrote:
> Bruno Desthuilliers enlightened us with:
>> Python has lists (which AFAIK really are arrays not linked lists,
>> but they are called 'lists').
>
> An array is generally understood as a list of items of the same type,
> hence Python lists aren't arrays.
Only in the same sen
bruce wrote:
> hi...
>
> i'm trying to deal with multi-dimension lists/arrays
Python has lists (which AFAIK really are arrays not linked lists, but
they are called 'lists'). FWIW, this is in the fine manual.
> i'd like to define a multi-dimension string list, and then manipulate the
> list as i
hi...
i'm trying to deal with multi-dimension lists/arrays
i'd like to define a multi-dimension string list, and then manipulate the
list as i need... primarily to add lists/information to the 'list/array' and
to compare the existing list information to new lists
i'm not sure if i need to import