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
2 Answers 2
You can use this:
if board[0][0] == board[1][1] == board[2][2] == X:
pass
answered Jan 13, 2021 at 8:26
Divyessh
2,7311 gold badge9 silver badges25 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
You can use:
if (board[0][0] and board[1][1] and board[2][2]) == X:
pass
geertjanvdk
3,52827 silver badges27 bronze badges
answered Jan 13, 2021 at 8:27
Noor Ahmed Natali
5413 silver badges13 bronze badges
Comments
lang-py