# Basit oyun tahtası board = [[" " for _ in range(3)] for _ in range(3)] def print_board(): for row in board: print("|".join(row)) print("-" * 5) def check_winner(): for row in board: if row[0] == row[1] == row[2] != " ": return True for col in range(3): if board[0][col] == board[1][col] == board[2][col] != " ": return True if board[0][0] == board[1][1] == board[2][2] != " " or \ board[0][2] == board[1][1] == board[2][0] != " ": return True return False