24ms (faster than 97%) Python3 Solution
This is more of an if-else problem. You have to think of every edge case.\n\n```python\nclass Solution:\n    def validTicTacToe(self, board: List[str]) -> bool:
This is more of an **if-else** problem. You have to think of every edge case.\n\n```python\nclass Solution:\n    def validTicTacToe(self, board: List[str]) -> bool:\n        X,O = self.countSymbols(board)\n        if O>X:\n\t\t    #Os can\'t  be greater than Xs\n            return False\n        elif abs(X-O)>1:\n\t\t    #Difference can only be 1 \n            return False\n        elif X>O:\n\t\t    #X can\'t have more moves than O if O is already won\n            if self.checkTriads(board,\'O\'): return False\n        else:\n\t\t    #X and O can\'t have equal moves if X is winning\n            if self.checkTriads(board,\'X\'): return False\n        return True\n            \n    \n    def countSymbols(self, board):\n        X = 0\n        O = 0\n        for row in board:\n            for i in row:\n                if i == \'X\':\n                    X+=1\n                elif i == \'O\':\n                    O+=1\n        return X,O\n                    \n    def checkTriads(self, board, sym=\'X\'):\n        #Checking for Hight triads\n        i = 0\n        while i<3:\n            if (board[0][i] == board[1][i] == board[2][i] == sym):\n                return True\n            i+=1\n            \n        #Checking for width\n        i=0\n        while i<3:\n            if (board[i][0] == board[i][1] == board[i][2] == sym):\n                return True\n            i+=1\n            \n        #Checking for diag.\n        if (board[0][0] == board[1][1] == board[2][2] == sym):\n                return True\n        if (board[0][2] == board[1][1] == board[2][0] == sym):\n                return True\n        return False\n\t\t
['Python', 'Python3']