1

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

asked Jan 13, 2021 at 8:24

2 Answers 2

2

You can use this:

if board[0][0] == board[1][1] == board[2][2] == X:
 pass
answered Jan 13, 2021 at 8:26
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.