My first stumbling block with Python

Max M maxm at mxm.dk
Fri Aug 23 11:10:18 CEST 2002


Mr. Neutron wrote:


> Something like 
> 
> 		MyMyArray[X][Y] = (tuple)

Depending on circumstance you could also use a tuple as a key in a dict 
and get much of the same effect:

     MyArray = {}
     MyArray[(x,y)] = (tuple,)

This is especially good if you have a sparsely populated array.


regards Max M




More information about the Python-list mailing list