Sharing my take on the Tic-Tac-Toc game.
The board is a list and I created a function to print it as a Tic-Tac-Toe board. I do wonder if it would be better to use a dictionary with key:value. But the list seems to work fine.
There is a class Player. Two players are created after getting input for their names. A function randomly decides who will start the game. Inside the Player class, there is a function that allows the selected player to change the number in the list to their symbol (X or O). The function also changes a current_player variable to the other player.
Finally there is a function that checks all the possible wining combinations for each player. The functions are combined inside a while loop. As long as no wining combination is detected, the play function keeps asking for input. When the loop has run 9 times, it calls it a tie.
Any feedback is welcome!