This question already has an answer here:
I have a problem with the if statement. If I use the if statement with "and" it doesn't seem to work. What did i do wrong?
>>> row1 = ["X","X","O"]
>>> if row1[0] and row1[1] and row1[2] == "O":
print("You lost")
You lost
Aucun commentaire:
Enregistrer un commentaire