Reputation: 113
Apparently:
if board[0][0] == X and board[1][1] == X and board[2][2] == X:
pass
Is not the same as:
if board[0][0] and board[1][1] and board[2][2] == X:
pass
How can I summarize this statement?
Thank you
Upvotes: 1
Views: 68
Reputation: 523
You can use:
if (board[0][0] and board[1][1] and board[2][2]) == X:
pass
Upvotes: 0
Reputation: 2721
You can use this:
if board[0][0] == board[1][1] == board[2][2] == X:
pass
Upvotes: 2