naturalborncyborg wrote:
Hi, I'm using nested lists as arrays and having some problems with
that approach. In my puzzle class there is a swapelement method which
doesn't work out.
What "doesn't work out"? On casual inspection that method seems to "work":
>>> p = Puzzle(2)
>>> p.elements[0][0] = 1
>>> p.elements[1][1] = 2
>>> p.elements
[[1, 0], [0, 2]]
>>> p.swapElements(0,0,1,1)
>>> p.elements
[[2, 0], [0, 1]]
>>>
What should it do instead?
Michael
--
http://mail.python.org/mailman/listinfo/python-list