On Mon, Sep 28, 2009 at 3:27 PM, Ethan Furman wrote:
> Simon Forman wrote:
>>
>> On Sun, Sep 27, 2009 at 12:40 PM, Someone Something
>> wrote:
>>
>>> I'm trying to write a little tic-tac-toe program I need a array/list such
>>> that I can represent the tic tac toe board with an x axis and y axis
Simon Forman wrote:
On Sun, Sep 27, 2009 at 12:40 PM, Someone Something
wrote:
I'm trying to write a little tic-tac-toe program I need a array/list such
that I can represent the tic tac toe board with an x axis and y axis and i
can access each square to find out whether there is an X or an O.
On Sun, Sep 27, 2009 at 12:40 PM, Someone Something
wrote:
> I'm trying to write a little tic-tac-toe program I need a array/list such
> that I can represent the tic tac toe board with an x axis and y axis and i
> can access each square to find out whether there is an X or an O. I have
> absolutel
On Sun, 27 Sep 2009 17:40:57 +0100, Someone Something
wrote:
I'm trying to write a little tic-tac-toe program I need a array/list such
that I can represent the tic tac toe board with an x axis and y axis and
i
can access each square to find out whether there is an X or an O. I have
absolut
Someone Something wrote:
I'm trying to write a little tic-tac-toe program I need a array/list
such that I can represent the tic tac toe board with an x axis and y
axis and i can access each square to find out whether there is an X or
an O. I have absolutely no idea how to do this in python and
Horacius ReX wrote:
> do you know how to do similar but in two dimensions ?
Investigate the numpy module if you are dealing with numbers.
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
DATA = [ [ 0 for i in range(ncolumns) ] for i in range(nrows) ]
Is one way.
DON'T do it like this:
row = [0] * ncolumns
data = [ row ] * nrows # WRONG!
Since after that, every row is the exact same object; if you set data[0][0]
= 1, the first element of _every_ row is 1.
But I guess you a
Horacius ReX:
> do you know how to do similar but in two dimensions ?
>>> nr = 3
>>> nc = 4
>>> [[None] * nc for _ in xrange(nr)]
[[None, None, None, None], [None, None, None, None], [None, None,
None, None]]
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Hello all,
I am trying to convert some C code into python. Since i am new to
python, i would like to know how to deal with multidimensional arrays?
Thanks,
-Joe
Here's a snippet of what i am trying to convert:
# define table0 15
# define table1 20
unsigned int Table[table0]
<[EMAIL PROTECTED]> wrote:
> I am trying to convert some C code into python. Since i am new to
> python, i would like to know how to deal with multidimensional arrays?
http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
might be helpful.
--
http://mail.p
[EMAIL PROTECTED] wrote:
: Hello all,
: I am trying to convert some C code into python. Since i am new to
: python, i would like to know how to deal with multidimensional arrays?
Here you go:
http://python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
Also, if your tab
11 matches
Mail list logo