Not Equal to Each Other?

ale.of.ginger at gmail.com ale.of.ginger at gmail.com
Thu Nov 3 22:03:03 EST 2005


For the

not cellboard[0] in cellboard[1:8] (I knew about ranges/slicing using a
colon, can't believe I didn't think of that!)

line, will I have to write that out for each number?

So the line:

not cellboard in ((cellboard[1:8]) and (cellboard[9] and cellboard[18]
and cellboard[27] and cellboard[36] and cellboard[45] and cellboard[54]
and cellboard[63] and cellboard[72]) and (cellboard[1:2] and
cellboard[9:11] and cellboard[18:20]))

will cover all the logic requirements for the number in cell 0 (well,
row 1, column 1).

But will I have to copy + paste + edit that for all 81 cells?  That
isn't complicated, just tedious - thanks though.




More information about the Python-list mailing list