{"id":17183,"date":"2021-09-19T11:37:05","date_gmt":"2021-09-19T06:07:05","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=17183"},"modified":"2021-09-19T11:37:08","modified_gmt":"2021-09-19T06:07:08","slug":"stopwatch-python","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/stopwatch-python\/","title":{"rendered":"Stopwatch in Python With and Without Using Tkinter"},"content":{"rendered":"\n<p>Generally, we are all aware of the stopwatch. There is a possible way to create a stopwatch in python. Do you know how it is? We understand that the datetime module is already available in python. Making use of that module, we can create a stopwatch in python. We hope this article is going to be amazing. You can use this as a primary-level mini project in python. Let us get start.<\/p>\n\n\n\n<p><strong>We will learn to design a stopwatch in two different ways. They are<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Using Tkinter <\/strong><\/li><li><strong>Without using Tkinter <\/strong><\/li><\/ol>\n\n\n\n<p><strong>Tkinter is a package that is very much useful in python. It is the standard python interference to GUI tool kit.<\/strong>\u00a0<strong>If you want to check whether the Tkinter is correctly<\/strong> installed on your system, <strong>type this command line on the terminal.\u00a0<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python -m tkinter<\/pre>\n\n\n\n<p><strong>It will open some simple Tk interference to let you know that the Tkinter is properly installed. Now let us make use of the Tkinter module to design a stopwatch in python.<\/strong><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#Why_datetime_module_is_important_to_a_create_stopwatch_in_python\" >Why datetime module is important to a create stopwatch in python?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#Code_to_create_a_simple_stopwatch_in_python_without_Tkinter\" >Code to create a simple stopwatch in python without Tkinter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#Code_with_explanation_to_create_a_stopwatch_in_python_with_Tkinter\" >Code with explanation to create a stopwatch in python with Tkinter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#Entire_Code_to_Create_Stopwatch_in_Python\" >Entire Code to Create Stopwatch in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#FAQs_on_Designing_a_Stopwatch_in_Python\" >FAQs on Designing a Stopwatch in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#Trending_Python_Articles\" >Trending Python Articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-why-datetime-module-is-important-to-a-create-stopwatch-in-python\"><span class=\"ez-toc-section\" id=\"Why_datetime_module_is_important_to_a_create_stopwatch_in_python\"><\/span>Why datetime module is important to a create stopwatch in python?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The\u00a0<strong>DateTime<\/strong>\u00a0module provides time objects that are similar to the Time objects. A date in Python is not an object, but we can import a module\u00a0<strong>\u201cdatetime\u201d<\/strong>\u00a0to get a date and time. By using the date time and Tkinter module, we are going to design a stopwatch in python.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-to-create-a-simple-stopwatch-in-python-without-tkinter\"><span class=\"ez-toc-section\" id=\"Code_to_create_a_simple_stopwatch_in_python_without_Tkinter\"><\/span>Code to create a simple stopwatch in python without Tkinter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Import time module to get the time objects. Create a while loop. Inside while loop creates try block that has some set of codes to run the stopwatch. While we press to enter, the stopwatch gets started and run until the user enters ctrl+c. After pressing enter user has to understand that stopwatch has begun. So that we give a print statement as stopwatch has started. We are creating another while loop to return the time elapsed during the run time.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport time\nwhile True:\n    try:\n        input(&quot;Press Enter to continue and ctrl+C to exit the stopwatch&quot;)\n        start_time=time.time()\n        print(&quot;Stopwatch has started&quot;)\n        while True:\n            print(&quot;Time elapsed:&quot;,round(time.time()-start_time,0),'secs',end='\\n')\n            time.sleep(1)\n<\/pre><\/div>\n\n\n<p>Create an except block; when the user hits the key ctrl+c, it will come to the except block and return the statements. In except block we have given like <span style=\"text-decoration: underline;\"><strong><a href=\"http:\/\/www.pythonpool.com\/python-timer\/\" target=\"_blank\" rel=\"noreferrer noopener\">Timer<\/a><\/strong><\/span> has stopped. After the timer stopped, we had to display the total time elapsed. So that we are giving another print statement to show the whole time elapsed.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nexcept KeyboardInterrupt:\n        print(&quot;Timer has stopped&quot;)\n        end_time=time.time()\n        print(&quot;The time elapsed:&quot;,round(end_time-start_time,2),'secs')\n        break\n<\/pre><\/div>\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Press Enter to continue and ctrl+C to exit the stopwatch\nStopwatch has started\nTime elapsed: 0.0 secs\nTime elapsed: 1.0 secs\nTime elapsed: 2.0 secs\nTime elapsed: 3.0 secs\nTime elapsed: 4.0 secs\nTime elapsed: 5.0 secs\nTime elapsed: 6.0 secs\nTime elapsed: 7.0 secs\nTime elapsed: 8.0 secs\nTime elapsed: 9.0 secs\nTime elapsed: 10.0 secs\nTime elapsed: 11.0 secs\nTimer has stopped\nThe time elapsed: 12.45 secs<\/pre>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-mike monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\">[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-with-explanation-to-create-a-stopwatch-in-python-with-tkinter\"><span class=\"ez-toc-section\" id=\"Code_with_explanation_to_create_a_stopwatch_in_python_with_Tkinter\"><\/span>Code with explanation to create a stopwatch in python with Tkinter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We need to import the Tkinter module to create a stopwatch in python. Next to import the datetime module to get a time. Declaring count as global and initializing count as zero.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom tkinter import *\nimport sys\nimport time\nglobal count\ncount =0\n<\/pre><\/div>\n\n\n<p>Create a class named stopwatch in python code. After creating a class, create a function to perform a reset operation. This function will reset the timing as 00:00:00, which is similar to restart the stopwatch.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nclass stopwatch():\n    def reset(self):\n        global count\n        count=1\n        self.t.set('00:00:00')  \n<\/pre><\/div>\n\n\n<p>Next, create a function named start to start the stopwatch. This function is helpful to start the stopwatch.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef start(self):\n        global count\n        count=0\n        self.timer()  \n<\/pre><\/div>\n\n\n<p>We need a stop function to stop the stopwatch. So we need to create another function named stop to perform the stop operation in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Stopwatch\" target=\"_blank\" rel=\"noreferrer noopener\">stopwatch<\/a>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n def stop(self):\n        global count\n        count=1\n<\/pre><\/div>\n\n\n<p>Always create an exit button while developing some applications. That will make a good impression on your application. So we need to create a function named close to perform the exit operation. While we click this exit button, it will come out of the application.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef close(self):\n        self.root.destroy()\n<\/pre><\/div>\n\n\n<p>Next, create a timer function to run the stopwatch. I hope you have seen that I have called a function as self.timer(). So after seeing that statement, the program will call this function and perform the task whatever is given in the timer function.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef timer(self):\n        global count\n        if(count==0):\n            self.d = str(self.t.get())\n            h,m,s = map(int,self.d.split(&quot;:&quot;)) \n            h = int(h)\n            m=int(m)\n            s= int(s)\n            if(s&lt;59):\n                s+=1\n            elif(s==59):\n                s=0\n                if(m&lt;59):\n                    m+=1\n                elif(m==59):\n                    m=0\n                    h+=1\n            if(h&lt;10):\n                h = str(0)+str(h)\n            else:\n                h= str(h)\n            if(m&lt;10):\n                m = str(0)+str(m)\n            else:\n                m = str(m)\n            if(s&lt;10):\n                s=str(0)+str(s)\n            else:\n                s=str(s)\n            self.d=h+&quot;:&quot;+m+&quot;:&quot;+s           \n            self.t.set(self.d)\n            if(count==0):\n                self.root.after(1000,self.timer) \n<\/pre><\/div>\n\n\n<p>After this, we create an <span style=\"text-decoration: underline;\"><strong><a href=\"http:\/\/www.pythonpool.com\/init-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">init function<\/a><\/strong><\/span> in that function, creating a button for all the operations. And also, this function will call all the functions. To make our stopwatch better, we are setting some background colors for the texts.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef __init__(self):\n        self.root=Tk()\n        self.root.title(&quot;Stop Watch&quot;)\n        self.root.geometry(&quot;600x200&quot;)\n        self.t = StringVar()\n        self.t.set(&quot;02:15:06&quot;)\n        self.lb = Label(self.root,textvariable=self.t,font=(&quot;Times 40 bold&quot;),bg=&quot;white&quot;)\n        self.bt1 = Button(self.root,text=&quot;Start&quot;,command=self.start,font=(&quot;Times 12 bold&quot;),bg=(&quot;green&quot;))\n        self.bt2 = Button(self.root,text=&quot;Stop&quot;,command=self.stop,font=(&quot;Times 12 bold&quot;),bg=(&quot;red&quot;))\n        self.bt3 = Button(self.root,text=&quot;Reset&quot;,command=self.reset,font=(&quot;Times 12 bold&quot;),bg=(&quot;orange&quot;))\n        self.bt4 = Button(self.root, text=&quot;Exit&quot;, command=self.close,font=(&quot;Times 12 bold&quot;),bg=(&quot;yellow&quot;))\n        self.lb.place(x=160,y=10)\n        self.bt1.place(x=120,y=100)\n        self.bt2.place(x=220,y=100)\n        self.bt3.place(x=320,y=100)\n        self.bt4.place(x=420,y=100)\n        self.label = Label(self.root,text=&quot;&quot;,font=(&quot;Times 40 bold&quot;))\n        self.root.configure(bg='black')\n        self.root.mainloop()\na=stopwatch()      \n<\/pre><\/div>\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-india monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending:<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\">[Fixed] nameerror: name Unicode is not defined<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-entire-code-to-create-stopwatch-in-python\"><span class=\"ez-toc-section\" id=\"Entire_Code_to_Create_Stopwatch_in_Python\"><\/span>Entire Code to Create Stopwatch in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom tkinter import *\nimport sys\nimport time\nglobal count\ncount =0\nclass stopwatch():\n    def reset(self):\n        global count\n        count=1\n        self.t.set('00:00:00')        \n    def start(self):\n        global count\n        count=0\n        self.timer()   \n    def stop(self):\n        global count\n        count=1\n    def close(self):\n        self.root.destroy()\n    def timer(self):\n        global count\n        if(count==0):\n            self.d = str(self.t.get())\n            h,m,s = map(int,self.d.split(&quot;:&quot;)) \n            h = int(h)\n            m=int(m)\n            s= int(s)\n            if(s&lt;59):\n                s+=1\n            elif(s==59):\n                s=0\n                if(m&lt;59):\n                    m+=1\n                elif(m==59):\n                    m=0\n                    h+=1\n            if(h&lt;10):\n                h = str(0)+str(h)\n            else:\n                h= str(h)\n            if(m&lt;10):\n                m = str(0)+str(m)\n            else:\n                m = str(m)\n            if(s&lt;10):\n                s=str(0)+str(s)\n            else:\n                s=str(s)\n            self.d=h+&quot;:&quot;+m+&quot;:&quot;+s           \n            self.t.set(self.d)\n            if(count==0):\n                self.root.after(1000,self.timer)     \n    def __init__(self):\n        self.root=Tk()\n        self.root.title(&quot;Stop Watch&quot;)\n        self.root.geometry(&quot;600x200&quot;)\n        self.t = StringVar()\n        self.t.set(&quot;02:15:06&quot;)\n        self.lb = Label(self.root,textvariable=self.t,font=(&quot;Times 40 bold&quot;),bg=&quot;white&quot;)\n        self.bt1 = Button(self.root,text=&quot;Start&quot;,command=self.start,font=(&quot;Times 12 bold&quot;),bg=(&quot;green&quot;))\n        self.bt2 = Button(self.root,text=&quot;Stop&quot;,command=self.stop,font=(&quot;Times 12 bold&quot;),bg=(&quot;red&quot;))\n        self.bt3 = Button(self.root,text=&quot;Reset&quot;,command=self.reset,font=(&quot;Times 12 bold&quot;),bg=(&quot;orange&quot;))\n        self.bt4 = Button(self.root, text=&quot;Exit&quot;, command=self.close,font=(&quot;Times 12 bold&quot;),bg=(&quot;yellow&quot;))\n        self.lb.place(x=160,y=10)\n        self.bt1.place(x=120,y=100)\n        self.bt2.place(x=220,y=100)\n        self.bt3.place(x=320,y=100)\n        self.bt4.place(x=420,y=100)\n        self.label = Label(self.root,text=&quot;&quot;,font=(&quot;Times 40 bold&quot;))\n        self.root.configure(bg='black')\n        self.root.mainloop()\na=stopwatch()      \n<\/pre><\/div>\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Screenshot-153.png\" alt=\"stopwatch in python\" class=\"wp-image-17218\" width=\"702\" height=\"261\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Screenshot-153.png 599w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Screenshot-153-300x112.png 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/figure>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-alpha monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\">[Solved] runtimeerror: cuda error: invalid device ordinal<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faqs-on-designing-a-stopwatch-in-python\"><span class=\"ez-toc-section\" id=\"FAQs_on_Designing_a_Stopwatch_in_Python\"><\/span>FAQs on Designing a Stopwatch in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1631974111421\"><strong class=\"schema-faq-question\">1. What are the necessary modules to create a stopwatch in python? <\/strong> <p class=\"schema-faq-answer\">datetime module and Tkinter are the necessary modules to create a stopwatch.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1632021390527\"><strong class=\"schema-faq-question\">2. Are there milliseconds included in the stopwatch?<\/strong> <p class=\"schema-faq-answer\">No, it includes only hours, minutes, and seconds.<\/p> <\/div> <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have entirely learned to create a stopwatch in python. This article will be beneficial for all python beginners. Learn this completely. Try to solve the code on your own. In case of any queries, do let us know in the comment box. We will be here for you. Learn python and shine!<\/p>\n\n\n<div class=\"monsterinsights-widget-popular-posts monsterinsights-widget-popular-posts-delta monsterinsights-popular-posts-styled monsterinsights-widget-popular-posts-columns-2\"><h2 class=\"monsterinsights-widget-popular-posts-widget-title\"><span class=\"ez-toc-section\" id=\"Trending_Python_Articles\"><\/span>Trending Python Articles<span class=\"ez-toc-section-end\"><\/span><\/h2><ul class=\"monsterinsights-widget-popular-posts-list\"><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 11, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] nameerror: name Unicode is not defined<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Solved] runtimeerror: cuda error: invalid device ordinal<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method.webp 1200w \" alt=\"[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><\/ul><\/div><p><\/p>","protected":false},"excerpt":{"rendered":"<p>Generally, we are all aware of the stopwatch. There is a possible way to create a stopwatch in python. Do you know how it is? &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Stopwatch in Python With and Without Using Tkinter\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/#more-17183\" aria-label=\"More on Stopwatch in Python With and Without Using Tkinter\">Read more<\/a><\/p>\n","protected":false},"author":22,"featured_media":17250,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1146,4461],"tags":[4465,4462,4463,4464],"class_list":["post-17183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-project","category-tkinter","tag-design-a-stopwatch-python","tag-python-stopwatch","tag-stopwatch","tag-stopwatch-code-in-python","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Stopwatch in Python With and Without Using Tkinter - Python Pool<\/title>\n<meta name=\"description\" content=\"Making use of that module we can create a stopwatch in python. We hope this article is going to be really amazing. You can use\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/stopwatch-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Stopwatch in Python With and Without Using Tkinter\" \/>\n<meta property=\"og:description\" content=\"Generally, we are all aware of the stopwatch. There is a possible way to create a stopwatch in python. Do you know how it is? We understand that the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/stopwatch-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-19T06:07:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-19T06:07:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp\" \/>\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\/webp\" \/>\n<meta name=\"author\" content=\"Priyalakshmi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Priyalakshmi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/\"},\"author\":{\"name\":\"Priyalakshmi\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/83e6e22a6c461cc1a8445bb473db2f20\"},\"headline\":\"Stopwatch in Python With and Without Using Tkinter\",\"datePublished\":\"2021-09-19T06:07:05+00:00\",\"dateModified\":\"2021-09-19T06:07:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/\"},\"wordCount\":747,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp\",\"keywords\":[\"design a stopwatch python\",\"python stopwatch\",\"stopwatch\",\"stopwatch code in python\"],\"articleSection\":[\"Project\",\"Tkinter\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/stopwatch-python\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/\",\"url\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/\",\"name\":\"Stopwatch in Python With and Without Using Tkinter - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp\",\"datePublished\":\"2021-09-19T06:07:05+00:00\",\"dateModified\":\"2021-09-19T06:07:08+00:00\",\"description\":\"Making use of that module we can create a stopwatch in python. We hope this article is going to be really amazing. You can use\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1631974111421\"},{\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1632021390527\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/stopwatch-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp\",\"width\":1200,\"height\":628,\"caption\":\"stopwatch python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stopwatch in Python With and Without Using Tkinter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/83e6e22a6c461cc1a8445bb473db2f20\",\"name\":\"Priyalakshmi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8f1aadb3b77a89fe5776d41fb52aec63200d0e68e92c71cb9aafac7fb4456696?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8f1aadb3b77a89fe5776d41fb52aec63200d0e68e92c71cb9aafac7fb4456696?s=96&d=wavatar&r=g\",\"caption\":\"Priyalakshmi\"}},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1631974111421\",\"position\":1,\"url\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1631974111421\",\"name\":\"1. What are the necessary modules to create a stopwatch in python?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"datetime module and Tkinter are the necessary modules to create a stopwatch.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1632021390527\",\"position\":2,\"url\":\"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1632021390527\",\"name\":\"2. Are there milliseconds included in the stopwatch?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No, it includes only hours, minutes, and seconds.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Stopwatch in Python With and Without Using Tkinter - Python Pool","description":"Making use of that module we can create a stopwatch in python. We hope this article is going to be really amazing. You can use","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:\/\/www.pythonpool.com\/stopwatch-python\/","og_locale":"en_US","og_type":"article","og_title":"Stopwatch in Python With and Without Using Tkinter","og_description":"Generally, we are all aware of the stopwatch. There is a possible way to create a stopwatch in python. Do you know how it is? We understand that the","og_url":"https:\/\/www.pythonpool.com\/stopwatch-python\/","og_site_name":"Python Pool","article_published_time":"2021-09-19T06:07:05+00:00","article_modified_time":"2021-09-19T06:07:08+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp","type":"image\/webp"}],"author":"Priyalakshmi","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Priyalakshmi","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/"},"author":{"name":"Priyalakshmi","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/83e6e22a6c461cc1a8445bb473db2f20"},"headline":"Stopwatch in Python With and Without Using Tkinter","datePublished":"2021-09-19T06:07:05+00:00","dateModified":"2021-09-19T06:07:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/"},"wordCount":747,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp","keywords":["design a stopwatch python","python stopwatch","stopwatch","stopwatch code in python"],"articleSection":["Project","Tkinter"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/stopwatch-python\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/","url":"https:\/\/www.pythonpool.com\/stopwatch-python\/","name":"Stopwatch in Python With and Without Using Tkinter - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp","datePublished":"2021-09-19T06:07:05+00:00","dateModified":"2021-09-19T06:07:08+00:00","description":"Making use of that module we can create a stopwatch in python. We hope this article is going to be really amazing. You can use","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1631974111421"},{"@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1632021390527"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/stopwatch-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Stopwatch-in-Python-Using-Tkinter.webp","width":1200,"height":628,"caption":"stopwatch python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Stopwatch in Python With and Without Using Tkinter"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/83e6e22a6c461cc1a8445bb473db2f20","name":"Priyalakshmi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8f1aadb3b77a89fe5776d41fb52aec63200d0e68e92c71cb9aafac7fb4456696?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8f1aadb3b77a89fe5776d41fb52aec63200d0e68e92c71cb9aafac7fb4456696?s=96&d=wavatar&r=g","caption":"Priyalakshmi"}},{"@type":"Question","@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1631974111421","position":1,"url":"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1631974111421","name":"1. What are the necessary modules to create a stopwatch in python?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"datetime module and Tkinter are the necessary modules to create a stopwatch.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1632021390527","position":2,"url":"https:\/\/www.pythonpool.com\/stopwatch-python\/#faq-question-1632021390527","name":"2. Are there milliseconds included in the stopwatch?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"No, it includes only hours, minutes, and seconds.","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/17183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=17183"}],"version-history":[{"count":45,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/17183\/revisions"}],"predecessor-version":[{"id":17256,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/17183\/revisions\/17256"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/17250"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=17183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=17183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=17183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}