Christoph Zwerschke wrote:
: Marc 'BlackJack' Rintsch schrieb:
:: On Sun, 02 Mar 2008 14:15:09 +0000, Steve Turner wrote:
::
::: Apart from doing something like
::: a=[0,0,0]
::: b=[0,0,0]
::: c=[0,0,0]
::: d=[a,b,c]
:::
::: is there a better way of creating d??
::
:: a = [[0] * 3
Marc 'BlackJack' Rintsch wrote:
: On Sun, 02 Mar 2008 14:15:09 +0000, Steve Turner wrote:
:
:: Apart from doing something like
:: a=[0,0,0]
:: b=[0,0,0]
:: c=[0,0,0]
:: d=[a,b,c]
::
:: is there a better way of creating d??
:
: a = [[0] * 3 for dummy in xrange(3)]
Thanks, Marc.
I finally decided to have a go with Python and am working through the
tutorial.
On my old BBC Computer I could do something like this:
DIM A(2,2)
to create a 3 by 3 array of data. Then I could set any point:
A(0,0) = foo
A(0,1) = bar
etc.
In Python I thought I could do this with:
>>> a=[0,0,