{"id":12711,"date":"2021-03-10T21:33:26","date_gmt":"2021-03-11T02:33:26","guid":{"rendered":"https:\/\/panamahitek.com\/como-crear-un-script-en-python\/"},"modified":"2021-08-23T11:48:50","modified_gmt":"2021-08-23T16:48:50","slug":"how-do-you-create-your-first-python-script","status":"publish","type":"post","link":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/","title":{"rendered":"How do you create your first Python Script?"},"content":{"rendered":"<p style=\"text-align: justify;\">Python is an extremely simple programming language that has gained enormous popularity in recent years. It has a huge number of features that make it very attractive to programmers, such as simplicity, the enormous amount of resources that are available, mathematical calculations and image processing tools, among many other things.<\/p>\n<p style=\"text-align: justify;\">I personally find Python to be a very useful programming language. It&#8217;s not my favorite (Java will always be), but it helps me solve things quickly and efficiently.<\/p>\n<p style=\"text-align: justify;\">In this post I am going to explain the absolute minimum you need to know to create a simple Python script. Let&#8217;s say this will be a tutorial on how to create your first Python program and I&#8217;ll show you how to run it.<\/p>\n<p style=\"text-align: justify;\">The first thing we have to do to program in Python is to install the Python compiler. This procedure depends on the platform we are working on. For example, in Windows it is enough to enter <a href=\"https:\/\/www.python.org\/downloads\/\">this page<\/a> and download and install the latest version of Python for our operating system. On Linux you can install Python from the terminal.<\/p>\n<p style=\"text-align: justify;\">Once Python is installed, any file with the .py extension can be executed on our operating system. Let&#8217;s look at an example.<\/p>\n<p style=\"text-align: justify;\">I have already installed Python and I have created a folder on my C disk called <strong>python_test<\/strong>, as shown in the following image:<\/p>\n<p><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12697\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test.png\" alt=\"\" width=\"1234\" height=\"744\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test.png 1234w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-300x181.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1024x617.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-768x463.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-696x420.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1068x644.png 1068w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-697x420.png 697w\" sizes=\"auto, (max-width: 1234px) 100vw, 1234px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Now in that folder I am going to create a text file with Windows Notepad. I&#8217;ll name it <strong>test.txt<\/strong><\/p>\n<p><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-12699 aligncenter\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1.png\" alt=\"\" width=\"581\" height=\"388\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1.png 1450w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1-300x200.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1-1024x684.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1-768x513.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1-696x465.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1-1068x713.png 1068w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-1-629x420.png 629w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/a>Inside of this file, we have to write the following code:<\/p>\n<pre class=\"lang:default decode:true \">print(\"Hello World\")<\/pre>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12701\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2.png\" alt=\"Creating a python script with Notepad\" width=\"556\" height=\"354\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2.png 1530w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2-300x191.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2-1024x652.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2-768x489.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2-696x443.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2-1068x680.png 1068w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-2-660x420.png 660w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/a>We save the text file and proceed to rename it. Now instead of being named <strong>test.txt<\/strong> it will be named <strong>test.py<\/strong>. When making this change we must see how the symbol of the file changes. If we installed the Python compiler right, it should look like this:<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-12703 aligncenter\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3.png\" alt=\"\" width=\"617\" height=\"171\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3.png 1154w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3-300x83.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3-1024x284.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3-768x213.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3-696x193.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-3-1068x296.png 1068w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">And that&#8217;s it. We already have our first Python script. It is a little program that prints the message &#8220;Hello World&#8221; on the console. If we execute it (by double clicking) we will see the result. Or not?<\/p>\n<p style=\"text-align: justify;\">When we double click on the script we will see that a black window opens and that it closes immediately. This is because the program runs and ends instantly, since it only has one line of code. I personally recommend testing the scripts we do on Windows using Powershell. For that we go to disk C and holding down the &#8220;shift&#8221; key, we double click on our <strong>python_test<\/strong> folder. This should allow us to see the following context menu:<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-12705 aligncenter\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4.png\" alt=\"\" width=\"537\" height=\"458\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4.png 1052w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4-300x256.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4-1024x874.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4-768x656.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4-696x594.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-4-492x420.png 492w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/a>By clicking there, what we will do is open a command window that will be located in the folder we created. After that we just run the code we create using the following command:<\/p>\n<pre class=\"lang:default decode:true \">python .\\test.py<\/pre>\n<p style=\"text-align: justify;\">With that, when pressing enter, we should get the following result:<\/p>\n<p><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12707 size-full\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5.png\" alt=\"python script results\" width=\"1460\" height=\"728\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5.png 1460w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5-300x150.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5-1024x511.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5-768x383.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5-696x347.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5-1068x533.png 1068w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-5-842x420.png 842w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">And there we see, the &#8220;Hello world&#8221; appears on the console. That is the result we expected to get when we created the<strong> test.py<\/strong> file. That single line of code written in a file created with Notepad is enough to create a Python script.<\/p>\n<p style=\"text-align: justify;\">And you will say, this is nonsense! Well, believe it or not, any regular Python scripts start out like this. It sounds simple, but it is precisely that simplicity that has made Python such a popular language.<\/p>\n<p style=\"text-align: justify;\">If we want to achieve something a little more interesting, such as obtaining the system time with a Python script, we simply search the Internet and we will find a code similar to this:<\/p>\n<pre class=\"lang:default decode:true \">from datetime import datetime\r\nnow = datetime.now()\r\nct = now.strftime(\"%H:%M:%S\")\r\nprint(\"Hora actual =\", ct)\r\n<\/pre>\n<p style=\"text-align: justify;\">We write that code in the file we made before (<strong>test.py<\/strong>) which we can edit directly from Notepad. The result of the execution is as follows:<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-12709\" src=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6.png\" alt=\"python script results\" width=\"675\" height=\"335\" srcset=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6.png 1458w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-300x149.png 300w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-1024x508.png 1024w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-768x381.png 768w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-324x160.png 324w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-696x346.png 696w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-1068x530.png 1068w, https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python_test-6-846x420.png 846w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">That is a script. A piece of code that does something, that gives you an output. That is one of the main uses of Python, creating scripts that solve things that can be as simple as giving you the time of your computer, or as complicated as solving an integral or doing a Fast Fourier Transform. If you want to learn more about Python, I recomend this post about Python Books:\u00a0<a href=\"https:\/\/gowithcode.com\/best-python-books\" rel=\"bookmark\">11 Best Python Books for Beginners and All Skill Levels (2021)<\/a>.<\/p>\n<p style=\"text-align: justify;\">Anyway, this is what I wanted to share with you in this post. I just wanted to show you how to create simple scripts and run them. Later I will share with you other more interesting things that I have learned to do over time and that have allowed me to work on very interesting projects using Python, such as <a href=\"https:\/\/panamahitek.com\/tratando-de-disenar-y-construir-un-respirador-mecanico-de-bajo-costo-en-panama\/\">this one<\/a> or <a href=\"https:\/\/panamahitek.com\/sistema-multisensorial-con-linkit-smart-duo\/\">this one<\/a>.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is an extremely simple programming language that has gained enormous popularity in recent years. It has a huge number of features that make it very attractive to programmers, such as simplicity, the enormous amount of resources that are available, mathematical calculations and image processing tools, among many other things. I personally find Python to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12717,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1984,1985],"tags":[1986,1987,1988,1989,1990],"class_list":{"0":"post-12711","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programming","8":"category-python-en","9":"tag-aprender-a-programar-en-python-en","10":"tag-como-crear-un-programa-en-python-en","11":"tag-crear-scripts-en-python-en","12":"tag-programar-en-python-en","13":"tag-python-en"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How do you create your first Python Script? - Panama Hitek<\/title>\n<meta name=\"description\" content=\"In this post I am going to explain the absolute minimum you need to know to create a simple Python script that you can run in your computer\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How do you create your first Python Script? - Panama Hitek\" \/>\n<meta property=\"og:description\" content=\"In this post I am going to explain the absolute minimum you need to know to create a simple Python script that you can run in your computer\" \/>\n<meta property=\"og:url\" content=\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Panama Hitek\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/antony.garcia.gonzalez\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-11T02:33:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-23T16:48:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1050\" \/>\n\t<meta property=\"og:image:height\" content=\"701\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Antony Garc\u00eda Gonz\u00e1lez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/antony_garcia_g\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Antony Garc\u00eda Gonz\u00e1lez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\"},\"author\":{\"name\":\"Antony Garc\u00eda Gonz\u00e1lez\",\"@id\":\"https:\/\/panamahitek.com\/en\/#\/schema\/person\/a22e06c60a9a3fad2dcddfb25a6fca6e\"},\"headline\":\"How do you create your first Python Script?\",\"datePublished\":\"2021-03-11T02:33:26+00:00\",\"dateModified\":\"2021-08-23T16:48:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\"},\"wordCount\":774,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg\",\"keywords\":[\"aprender a programar en python\",\"como crear un programa en python\",\"crear scripts en python\",\"programar en python\",\"Python\"],\"articleSection\":[\"Programming\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\",\"url\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\",\"name\":\"How do you create your first Python Script? - Panama Hitek\",\"isPartOf\":{\"@id\":\"https:\/\/panamahitek.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg\",\"datePublished\":\"2021-03-11T02:33:26+00:00\",\"dateModified\":\"2021-08-23T16:48:50+00:00\",\"author\":{\"@id\":\"https:\/\/panamahitek.com\/en\/#\/schema\/person\/a22e06c60a9a3fad2dcddfb25a6fca6e\"},\"description\":\"In this post I am going to explain the absolute minimum you need to know to create a simple Python script that you can run in your computer\",\"breadcrumb\":{\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage\",\"url\":\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg\",\"contentUrl\":\"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg\",\"width\":1050,\"height\":701},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/panamahitek.com\/en\/home\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How do you create your first Python Script?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/panamahitek.com\/en\/#website\",\"url\":\"https:\/\/panamahitek.com\/en\/\",\"name\":\"Panama Hitek\",\"description\":\"Conocimiento libre, de Panam\u00e1 para el mundo\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/panamahitek.com\/en\/#\/schema\/person\/a22e06c60a9a3fad2dcddfb25a6fca6e\",\"name\":\"Antony Garc\u00eda Gonz\u00e1lez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/panamahitek.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d7a10397454e66de561db7fc2ed37dd2bd115478c378b22eaafd410de973dfd1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d7a10397454e66de561db7fc2ed37dd2bd115478c378b22eaafd410de973dfd1?s=96&d=mm&r=g\",\"caption\":\"Antony Garc\u00eda Gonz\u00e1lez\"},\"description\":\"Ingeniero Electromec\u00e1nico, egresado de la Universidad Tecnol\u00f3gica de Panam\u00e1. Miembro fundador de Panama Hitek. Entusiasta de la electr\u00f3nica y la programaci\u00f3n.\",\"sameAs\":[\"https:\/\/www.facebook.com\/antony.garcia.gonzalez\",\"https:\/\/www.instagram.com\/antony.garcia.gonzalez\",\"https:\/\/www.linkedin.com\/in\/antony-garcia-gonzalez-96539461\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/antony_garcia_g\"],\"url\":\"https:\/\/panamahitek.com\/en\/author\/agarciag-2\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How do you create your first Python Script? - Panama Hitek","description":"In this post I am going to explain the absolute minimum you need to know to create a simple Python script that you can run in your computer","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:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/","og_locale":"en_US","og_type":"article","og_title":"How do you create your first Python Script? - Panama Hitek","og_description":"In this post I am going to explain the absolute minimum you need to know to create a simple Python script that you can run in your computer","og_url":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/","og_site_name":"Panama Hitek","article_author":"https:\/\/www.facebook.com\/antony.garcia.gonzalez","article_published_time":"2021-03-11T02:33:26+00:00","article_modified_time":"2021-08-23T16:48:50+00:00","og_image":[{"width":1050,"height":701,"url":"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg","type":"image\/jpeg"}],"author":"Antony Garc\u00eda Gonz\u00e1lez","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/antony_garcia_g","twitter_misc":{"Written by":"Antony Garc\u00eda Gonz\u00e1lez","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#article","isPartOf":{"@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/"},"author":{"name":"Antony Garc\u00eda Gonz\u00e1lez","@id":"https:\/\/panamahitek.com\/en\/#\/schema\/person\/a22e06c60a9a3fad2dcddfb25a6fca6e"},"headline":"How do you create your first Python Script?","datePublished":"2021-03-11T02:33:26+00:00","dateModified":"2021-08-23T16:48:50+00:00","mainEntityOfPage":{"@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/"},"wordCount":774,"commentCount":0,"image":{"@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage"},"thumbnailUrl":"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg","keywords":["aprender a programar en python","como crear un programa en python","crear scripts en python","programar en python","Python"],"articleSection":["Programming","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/","url":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/","name":"How do you create your first Python Script? - Panama Hitek","isPartOf":{"@id":"https:\/\/panamahitek.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage"},"image":{"@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage"},"thumbnailUrl":"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg","datePublished":"2021-03-11T02:33:26+00:00","dateModified":"2021-08-23T16:48:50+00:00","author":{"@id":"https:\/\/panamahitek.com\/en\/#\/schema\/person\/a22e06c60a9a3fad2dcddfb25a6fca6e"},"description":"In this post I am going to explain the absolute minimum you need to know to create a simple Python script that you can run in your computer","breadcrumb":{"@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#primaryimage","url":"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg","contentUrl":"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg","width":1050,"height":701},{"@type":"BreadcrumbList","@id":"https:\/\/panamahitek.com\/en\/how-do-you-create-your-first-python-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/panamahitek.com\/en\/home\/"},{"@type":"ListItem","position":2,"name":"How do you create your first Python Script?"}]},{"@type":"WebSite","@id":"https:\/\/panamahitek.com\/en\/#website","url":"https:\/\/panamahitek.com\/en\/","name":"Panama Hitek","description":"Conocimiento libre, de Panam\u00e1 para el mundo","inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/panamahitek.com\/en\/#\/schema\/person\/a22e06c60a9a3fad2dcddfb25a6fca6e","name":"Antony Garc\u00eda Gonz\u00e1lez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/panamahitek.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d7a10397454e66de561db7fc2ed37dd2bd115478c378b22eaafd410de973dfd1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d7a10397454e66de561db7fc2ed37dd2bd115478c378b22eaafd410de973dfd1?s=96&d=mm&r=g","caption":"Antony Garc\u00eda Gonz\u00e1lez"},"description":"Ingeniero Electromec\u00e1nico, egresado de la Universidad Tecnol\u00f3gica de Panam\u00e1. Miembro fundador de Panama Hitek. Entusiasta de la electr\u00f3nica y la programaci\u00f3n.","sameAs":["https:\/\/www.facebook.com\/antony.garcia.gonzalez","https:\/\/www.instagram.com\/antony.garcia.gonzalez","https:\/\/www.linkedin.com\/in\/antony-garcia-gonzalez-96539461\/","https:\/\/x.com\/https:\/\/twitter.com\/antony_garcia_g"],"url":"https:\/\/panamahitek.com\/en\/author\/agarciag-2\/"}]}},"jetpack_featured_media_url":"https:\/\/panamahitek.com\/wp-content\/uploads\/2021\/03\/python.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/posts\/12711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/comments?post=12711"}],"version-history":[{"count":0,"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/posts\/12711\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/media\/12717"}],"wp:attachment":[{"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/media?parent=12711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/categories?post=12711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/panamahitek.com\/en\/wp-json\/wp\/v2\/tags?post=12711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}