"Mark Tolonen" <[EMAIL PROTECTED]> wrote
L = [[0,0,0] *3]
I think you meant:
[[0,0,0]]*3
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
Yes indeed, to much haste and not enough testing!
Alan G
___
Tutor maillist - Tutor@python.org
http://mail.python.o
"Alan Gauld" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Something like
L = [[0,0,0] *3]
I think you meant:
[[0,0,0]]*3
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
-Mark
Now L contains 3 copies of the same list so when you change
any one copy it is reflected in all of
<[EMAIL PROTECTED]> wrote
self.boardarray[row][col] = self.currentPlayer
4, self.boardarray[2][4] will be set to "2". Instead, the program is
setting multiple values within the list as 2. Here is an example
output, when I click on (0,0):
[[2, 0, 0, 0, 0], [2, 0, 0, 0, 0], [2, 0, 0, 0, 0],
[EMAIL PROTECTED] wrote:
Hello,
I am completely baffled by this action and would appreciate any help. My
problem is occurring within a class which is within a larger program; if
I need to post the entire program let me know and I will. It's only
about 250 lines so far. Anyways, I am using a l