If Statement Error (Tic Tac Toe)

ale.of.ginger at gmail.com ale.of.ginger at gmail.com
Tue Nov 1 23:08:00 CET 2005

Thank you.  It seems I didn't understand logic statements as much as I
thought I did!

The one remaining question I have deals with this:

if gameboard[cell] not in 'OX':
        gameboard[cell] = 'O'
        print "This cell is already filled."
        turnnumber -= 1

(gameboard[cell] not in 'OX' is the gameboard[cell] != 'OX' text I sort
of used in my code, right?)

I am confused about "OX":  what exactly *is* it?  After that, I plan to
rewrite all the code... :)

More information about the Python-list mailing list