Checking for winner in Tic tac toe while loop
I am writing a text-based tic-tac toe Object oriented programming game but the problem I'm having problem with declaring the winner It print 'You Win' Twice ``` while not board().check_result(): game_play().plyr() if(board().check_result()==True): break game_play().com() ``` But the problem I'm having now is it prints 'You won' twice which I don't want The full code below ``` from random import choice class board: sample=['-','-','-','-','-','-','-','-','-'] win_comb=[ (0,1,2), (3,4,5), (6,7,8), (0,3,6), (1,4,7), (2,5,8), (0,4,8), (2,4,6) ] def board_layout(self): print("Welcome that's the board layout") print(1,'|',2,'|',3) print(4,'|',5,'|',6) print(7,'|',8,'|',9) def show(self): print() print(board.sample[0],' | ',board.sample[1],' | ',board.sample[2]) print(board.sample[3],' | ',board.sample[4],' | ',board.sample[5]) print(board.sample[6],' | ',board.sample[7],' | ',board.sample[8]) def check_result(self): for a,b,c in