Arrays? (Or lists if you prefer)

Hendrik van Rooyen mail at microcorp.co.za
Mon Oct 23 02:46:25 EDT 2006


From: <Hakusa at gmail.com> wrote:
8<---------------------------------------

> So:
> Way to do SIMPLE array, either internally or externally, with Python,
> please.

to help you see it - here is a simple 3 row by 3 column list:

myarray = [[1,2,3],[4,5,6],[7,8,9]]

the first "row" is myarray[0] - ie the list [1,2,3]

the middle element is myarray[1][1] - ie 5 - row 1, col 1.

the last element in the first row is myarray[0][2] - ie 3

play with it at the interactive prompt...

HTH - Hendrik




More information about the Python-list mailing list