DEV Community

James Shah
James Shah

Posted on

Tic Tac Toe Python The Classic TicTacToe Game in Python

So, the best and the most fun way to learn any programming language for me has always been by developing a fun project like a simple game or some project that I would use in my daily life.

So, when I started to learn Python, I started with this No Starch Press published book “Automate The Boring Stuff With Python” which is just awesome and If you are looking for a book to get started learning python, I would recommend you to go through this book. Its very beginner-friendly and it covers almost all the basic topics of python. So, while solving the exercises in this book, I came across this TicTacToe game implementation in python.

And Now Play Time:

TicTacToe

Checkout the Full code explanation here.

Top comments (6)

Collapse
 
highcenburg profile image
Vicente G. Reyes

Could you please add more context to this post?

Collapse
 
jamesshah profile image
James Shah

Sure. Can you elaborate particularly what should i add/change?

Collapse
 
highcenburg profile image
Vicente G. Reyes

Sure. As a community mod, I find this purely promotional.

You can add at least 1 or 2 snippets of code with an explanation of what they do.

Cheers

Thread Thread
 
jamesshah profile image
James Shah

Okay. Changed it. Thanks for the suggestion.

Collapse
 
jarvissilva profile image
Jarvis Silva

Great python program here are some more python game programs for you with code.

Collapse
 
anik2000s profile image
anik2000s

if count == 9:
print("\nGame Over.\n")

print("It's a Tie!!")

I think after this line a break is missing.