

{"id":85094,"date":"2021-01-08T10:52:00","date_gmt":"2021-01-08T05:22:00","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=85094"},"modified":"2026-06-01T11:59:23","modified_gmt":"2026-06-01T06:29:23","slug":"python-tic-tac-toe","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/","title":{"rendered":"Python Tic Tac Toe &#8211; Classic Tic-Tac-Toe Game in Python"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:2505,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1N19PKQCWpe4Ekq4Slnyp_yd4nYEwsLdj\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601062935\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1N19PKQCWpe4Ekq4Slnyp_yd4nYEwsLdj\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-02 06:27:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-05 09:29:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-08 10:27:28&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-08 10:27:28&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Tic-Tac-Toe game is an easy game which is mostly played among children and it also helps them to improve their concentration.<\/p>\n<p>The objective of this tic-tac-toe game python project is to build a tic-tac-toe game so you can play it without wasting paper and improve your concentration. To build this game we use the tkinter module with the concept of python.<\/p>\n<p>To play this game we require two players to play one is X and the other is O and both players play by putting their marks in empty squares.<\/p>\n<p>To win the game players have to get 3 of her marks in a row (up, down, across, or diagonally).<\/p>\n<h3>Project Prerequisites<\/h3>\n<p>To build tic-tac-toe game using python we require tkinter module and basic concept of python<\/p>\n<p>Tkinter modules is a standard graphical user interface used to render graphics.<\/p>\n<p>Tkinter.messagebox used to display message box<\/p>\n<p>To install tkinter modules we used pip install command on command prompt:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install tkinter\r\n<\/pre>\n<h3>Download Tic-Tac-Toe Game Python Code<\/h3>\n<p>Download source code of tic tac toe game python project: <a href=\"https:\/\/drive.google.com\/file\/d\/1N19PKQCWpe4Ekq4Slnyp_yd4nYEwsLdj\/view?usp=drive_link\"><strong>Tic Tac Toe Game Python Code<\/strong><\/a><\/p>\n<h3>Project File Structure<\/h3>\n<p>These are the step to build Tic-Tac-Toe game using python :<\/p>\n<ul>\n<li>Import modules<\/li>\n<li>Initialize window<\/li>\n<li>Function to check result<\/li>\n<li>Function to check the winner<\/li>\n<li>Define labels and buttons<\/li>\n<\/ul>\n<h4>1. Import modules<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from tkinter import *\r\nimport tkinter.messagebox as msg\r\n<\/pre>\n<p>In this step, we import tkinter and messsagebox module<\/p>\n<h4>2. Initialize window<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">root= Tk()\r\nroot.title('TIC-TAC-TOE---DataFlair')\r\n\r\ndigits = [1,2,3,4,5,6,7,8,9]\r\nmark = '' \u201c\r\ncount = 0\r\npanels = [\"panel\"]*10\r\n<\/pre>\n<ul>\n<li><strong>Tk()<\/strong> is use to initialize window<\/li>\n<li><strong>title()<\/strong> used to set the title of the window<\/li>\n<\/ul>\n<h4>3. Function to check the result<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def win(panels,sign):\r\n    return ((panels[1] == panels[2] == panels [3] == sign)\r\n            or (panels[1] == panels[4] == panels [7] == sign)\r\n            or (panels[1] == panels[5] == panels [9] == sign)\r\n            or (panels[2] == panels[5] == panels [8] == sign)\r\n            or (panels[3] == panels[6] == panels [9] == sign)\r\n            or (panels[3] == panels[5] == panels [7] == sign)\r\n            or (panels[4] == panels[5] == panels [6] == sign) \r\n            or (panels[7] == panels[8] == panels [9] == sign))\r\n<\/pre>\n<p>In this function, the result will be checked by checking which player makes three of their marks in a row (up, down, across, or diagonally).<\/p>\n<h4>4. Function to check the winner<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def checker(digit):\r\n    global count, mark, digits\r\n    if digit==1 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mar\r\n        button1.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==2 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button2.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==3 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button3.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==4 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button4.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==5 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button5.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==6 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button6.config(text = mark)\r\n        count = count+1\r\n        sign \r\nif(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==7 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button7.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==8 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button8.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n\r\n    if digit==9 and digit in digits:\r\n        digits.remove(digit)\r\n        if count%2==0:\r\n            mark ='X'\r\n            panels[digit]=mark\r\n        elif count%2!=0:\r\n            mark = 'O'\r\n            panels[digit]=mark\r\n        button9.config(text = mark)\r\n        count = count+1\r\n        sign = mark\r\n        if(win(panels,sign) and sign=='X'):\r\n            msg.showinfo(\"Result\",\"Player1 wins\")\r\n            root.destroy()\r\n        elif(win(panels,sign) and sign=='O'):\r\n            msg.showinfo(\"Result\",\"Player2 wins\")\r\n            root.destroy()\r\n  \r\n    if(count&gt;8 and win(panels,'X')==False and win(panels,'O')==False):\r\n        msg.showinfo(\"Result\",\"Match Tied\")\r\n        root.destroy()\r\n<\/pre>\n<p>Players have a total of 9 clicks to play the game. Each time the player clicked, one chance will decrease by increasing the value of count by 1 if the value of count is greater than 8 then the result of game is tie<\/p>\n<ul>\n<li>If the value of count is even then player1 will play else player2 will play.<\/li>\n<li><strong>config()<\/strong> used to mark the button with appropriate text<\/li>\n<li><strong>showinfo()<\/strong> methods in the messagebox widget used to show some relevant information<\/li>\n<li><strong>destroy()<\/strong> stop the mainloop to quit the program<\/li>\n<\/ul>\n<h4>5. Define labels and buttons<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Label(root,text=\"player1 : X\",font=\"times 15\").grid(row=0,column=1)\r\nLabel(root,text=\"player2 : O\",font=\"times 15\").grid(row=0,column=2)\r\n\r\nbutton1=Button(root,width=15,font=('Times 16 bold'),height=7,command=lambda:checker(1))\r\nbutton1.grid(row=1,column=1)\r\nbutton2=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda:checker(2))\r\nbutton2.grid(row=1,column=2)\r\n\r\nbutton3=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(3))\r\nbutton3.grid(row=1,column=3)\r\nbutton4=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(4))\r\nbutton4.grid(row=2,column=1)\r\n\r\nbutton5=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(5))\r\nbutton5.grid(row=2,column=2)\r\nbutton6=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(6))\r\nbutton6.grid(row=2,column=3)\r\n\r\nbutton7=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(7))\r\nbutton7.grid(row=3,column=1)\r\nbutton8=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(8))\r\nbutton8.grid(row=3,column=2)\r\n\r\nbutton9=Button(root,width=15,height=7,font=('Times 16 bold'),command=lambda: checker(9))\r\nbutton9.grid(row=3,column=3)\r\n\r\n\r\nroot.mainloop()\r\n<\/pre>\n<p><strong>Label()<\/strong> widget used to display text that users aren&#8217;t able to modify.<br \/>\n<strong>Button()<\/strong> widget display button<\/p>\n<ul>\n<li><strong>root<\/strong> is the name of window which we refered<\/li>\n<li><strong>text<\/strong> stores the value which we display on the label<\/li>\n<li><strong>font<\/strong> in which our text is written<\/li>\n<li><strong>command<\/strong> will called when the button is clicked<\/li>\n<li><strong>lambda()<\/strong> function used to send specific data to the callback function.<\/li>\n<\/ul>\n<p><strong>mainloop()<\/strong> method executes when we want to run our program.<\/p>\n<h4>Tic Tac Toe Python Project Output<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-85099\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output.png\" alt=\"python tic tac toe output\" width=\"1366\" height=\"726\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-300x159.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-1024x544.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-150x80.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-768x408.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-720x383.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-520x276.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe-output-320x170.png 320w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>We have successfully devloped the Tic-Tac-Toe game project in python. We use tkinter module for rendering graphics on a display window. We learn how to create buttons and config text on buttons and also how to use lambda functions to send specific values to callback functions.<\/p>\n<p>In this way we successfully made a Tic-Tac-Toe game python project. I hope you enjoyed building tic-tac-toe game project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tic-Tac-Toe game is an easy game which is mostly played among children and it also helps them to improve their concentration. The objective of this tic-tac-toe game python project is to build a tic-tac-toe&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":85101,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[21082,22734,21099,22475,23695],"class_list":["post-85094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python-project","tag-python-project-for-beginners","tag-python-project-with-source-code","tag-tic-tac-toe-game","tag-tic-tac-toe-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Tic Tac Toe - Classic Tic-Tac-Toe Game in Python - DataFlair<\/title>\n<meta name=\"description\" content=\"Create Tic Tac Toe game in Python - a simple python project for beginners. We use tkinter for the gui and few basic concepts\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Tic Tac Toe - Classic Tic-Tac-Toe Game in Python - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Create Tic Tac Toe game in Python - a simple python project for beginners. We use tkinter for the gui and few basic concepts\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-08T05:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T06:29:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Tic Tac Toe - Classic Tic-Tac-Toe Game in Python - DataFlair","description":"Create Tic Tac Toe game in Python - a simple python project for beginners. We use tkinter for the gui and few basic concepts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/","og_locale":"en_US","og_type":"article","og_title":"Python Tic Tac Toe - Classic Tic-Tac-Toe Game in Python - DataFlair","og_description":"Create Tic Tac Toe game in Python - a simple python project for beginners. We use tkinter for the gui and few basic concepts","og_url":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-01-08T05:22:00+00:00","article_modified_time":"2026-06-01T06:29:23+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"Python Tic Tac Toe &#8211; Classic Tic-Tac-Toe Game in Python","datePublished":"2021-01-08T05:22:00+00:00","dateModified":"2026-06-01T06:29:23+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/"},"wordCount":514,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe.jpg","keywords":["Python project","python project for beginners","python project with source code","tic tac toe game","tic tac toe python"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/","url":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/","name":"Python Tic Tac Toe - Classic Tic-Tac-Toe Game in Python - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe.jpg","datePublished":"2021-01-08T05:22:00+00:00","dateModified":"2026-06-01T06:29:23+00:00","description":"Create Tic Tac Toe game in Python - a simple python project for beginners. We use tkinter for the gui and few basic concepts","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/01\/python-tic-tac-toe.jpg","width":1200,"height":628,"caption":"python tic tac toe"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-tic-tac-toe\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python Tic Tac Toe &#8211; Classic Tic-Tac-Toe Game in Python"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/85094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=85094"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/85094\/revisions"}],"predecessor-version":[{"id":148574,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/85094\/revisions\/148574"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/85101"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=85094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=85094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=85094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}