My first stumbling block with Python
fredrik at pythonware.com
Thu Aug 22 16:31:33 CEST 2002
"Mr. Neutron" wrote:
> I found the answer by using a list of lists
> MyArray = [ *512 ]
> I can now do
> MyArray [Y][X] = (X,Y,Z)
> and it works fine.
> Now my question is what exactly is this code doing? I don't understand
> the way the list is being created (how can I multiply a list?).
"4.50. My multidimensional list (array) is broken! What gives?"
"s * n , n * s -> n shallow copies of s concatenated "
" /.../ Note also that the copies are shallow; nested
structures are not copied. This often haunts new Python
More information about the Python-list