diff --git a/Python/tic_tac_toe.py b/Python/tic_tac_toe.py new file mode 100644 index 0000000..35faefb --- /dev/null +++ b/Python/tic_tac_toe.py @@ -0,0 +1,5 @@ +def tic_tac_toe(board): + for row in board: + if row.count(row[0]) == 3 and row[0] != ' ': + return f"{row[0]} wins!" + return "No winner!"