{"id":78378,"date":"2020-04-19T10:00:10","date_gmt":"2020-04-19T04:30:10","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=78378"},"modified":"2020-04-19T10:00:10","modified_gmt":"2020-04-19T04:30:10","slug":"python-programming-facts","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/","title":{"rendered":"9 Interesting Python Facts a Python Programmer should know"},"content":{"rendered":"<p>Python is one of the most emerging <strong>programming languages<\/strong>. It is a <strong>high-level programming language<\/strong> that has <strong>user-friendly syntax<\/strong>. It is known to have <strong>fewer lines of code<\/strong> in an <strong>easy<\/strong> and <strong>simple<\/strong> form.<\/p>\n<p>Python is extensively used by <strong>many large organizations<\/strong>. Besides all these <strong>technical aspects<\/strong>, there are amazing Python facts as well. These <strong>Python facts<\/strong> can be helpful to the developer.<\/p>\n<p>Python is an <strong>exclusive language<\/strong> with many interesting facts you need to know.<\/p>\n<p>So, let&#8217;s begin with some <strong>unique<\/strong> and <strong>interesting facts<\/strong> about Python that will amaze you:<\/p>\n<h3>1. Nomenclature fact of Python<\/h3>\n<p>This name \u2018Python\u2019 is extracted from a British comedy series, <strong>\u201cMonty Python\u2019s Flying Circus\u201d<\/strong>. It is <strong>not named<\/strong> a <strong>snake<\/strong>. It is said that this was the <strong>favorite series<\/strong> of its <strong>inventor Guido Van Rossum<\/strong>. He named it Python because it is <strong>short<\/strong>, <strong>mysterious<\/strong> and <strong>unique<\/strong>.<\/p>\n<h3>2. There is an immortal poem written about Python<\/h3>\n<p>Tim Peters wrote an <strong>interesting poem<\/strong> about Python which highlights some of the python facts. It is popular as <strong>\u201cThe Zen of Python\u201d<\/strong>.<\/p>\n<p>This poem is beautifully <strong>composed<\/strong>. You can get this poem if you write <strong>import<\/strong> this in your <strong>python compiler<\/strong>.<\/p>\n<p>The <strong>Zen of Python<\/strong>, by <strong>Tim Peters<\/strong><\/p>\n<p><strong><em>Beautiful is better than ugly.<\/em><\/strong><br \/>\n<strong><em>Explicit is better than implicit.<\/em><\/strong><br \/>\n<strong><em>Simple is better than complex.<\/em><\/strong><br \/>\n<strong><em>Complex is better than complicated.<\/em><\/strong><br \/>\n<strong><em>Flat is better than nested.<\/em><\/strong><br \/>\n<strong><em>Sparse is better than dense.<\/em><\/strong><br \/>\n<strong><em>Readability counts.<\/em><\/strong><br \/>\n<strong><em>Special cases aren&#8217;t special enough to break the rules.<\/em><\/strong><br \/>\n<strong><em>Although practicality beats purity.<\/em><\/strong><br \/>\n<strong><em>Errors should never pass silently.<\/em><\/strong><br \/>\n<strong><em>Unless explicitly silenced.<\/em><\/strong><br \/>\n<strong><em>In the face of ambiguity, refuse the temptation to guess.<\/em><\/strong><br \/>\n<strong><em>There should be one&#8211; and preferably only one &#8211;obvious way to do it.<\/em><\/strong><br \/>\n<strong><em>Although that way may not be obvious at first unless you&#8217;re Dutch.<\/em><\/strong><br \/>\n<strong><em>Now is better than never.<\/em><\/strong><br \/>\n<strong><em>Although never is often better than *right* now.<\/em><\/strong><br \/>\n<strong><em>If the implementation is hard to explain, it&#8217;s a bad idea.<\/em><\/strong><br \/>\n<strong><em>If the implementation is easy to explain, it may be a good idea.<\/em><\/strong><br \/>\n<strong><em>Namespaces are one honking great idea &#8212; let&#8217;s do more of those!<\/em><\/strong><\/p>\n<h3>3. Python follows chain comparison<\/h3>\n<p>In Python, there can be <strong>multiple comparisons<\/strong> at once. It is able to <strong>check multiple conditions<\/strong> at the <strong>same time<\/strong>.<\/p>\n<p>While in <strong>other programming languages<\/strong>, you can <strong>not program<\/strong> a <strong>chain of comparison operators<\/strong>. The <strong>comparison operators<\/strong> can be <strong>chained<\/strong> <strong>randomly<\/strong>. It <strong>does not<\/strong> have to <strong>follow<\/strong> a <strong>particular order<\/strong> of <strong>operators<\/strong>.<\/p>\n<h3>4. Functions in Python can return multiple values<\/h3>\n<p>Python offers a feature to <strong>return multiple values<\/strong> using <strong>function<\/strong>. It returns the <strong>value as a tuple<\/strong>.<\/p>\n<p>While it is <strong>not possible<\/strong> with other languages such as <strong>Java<\/strong>, <strong>C<\/strong>, etc.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(\u201cCode by TechVidvan\u201d)\nprint(\u201cThis is coded on Google Colab\u201d)\ndef fun():\n    Name = \u201cTechVidvan\u201d\n    X = 6\n    Return name, x;\nName, x = fun()\nprint(name)\nprint(x)<\/pre>\n<h3>5. Python does not need compiler<\/h3>\n<p>Python relies on an <strong>interpreter<\/strong>. Unlike other programming languages, it <strong>does not need<\/strong> a <strong>compiler<\/strong>. The <strong>code<\/strong> is <strong>stored<\/strong> in a <strong>.pyc file<\/strong>. This <strong>file<\/strong> acts as a <strong>dynamic engine<\/strong> for <strong>Python eliminating<\/strong> the <strong>need<\/strong> of any <strong>compiler<\/strong>.<\/p>\n<h3>6. Python does not enhance the use of pointer<\/h3>\n<p>In Python, <strong>every program<\/strong> is done by <strong>reference<\/strong>. It <strong>does not<\/strong> support <strong>pointer<\/strong>.<\/p>\n<h3>7. Python has a variant of C and Java<\/h3>\n<p>Python has <strong>incorporated<\/strong> the <strong>variants<\/strong> of <strong>C<\/strong> and <strong>Java<\/strong> such as <strong>CPython, Jython,<\/strong> etc.<\/p>\n<p>The <strong>C<\/strong> variant is <strong>CPython<\/strong>, to give Python the glimpse<strong> benefits of C language<\/strong>. It is because CPython is <strong>beneficial<\/strong> in terms of <strong>performance<\/strong>, as it has both a <strong>compiler<\/strong> and an <strong>interpreter<\/strong>.<\/p>\n<p>The Java variant of Python is <strong>Jython<\/strong>. It drops the highlighting feature of Java such as <strong>productivity<\/strong>.<\/p>\n<h3>8. Python supports function unpacking<\/h3>\n<p>It another interesting fact about Python. It allows you to <strong>easily unpack<\/strong> a <strong>list<\/strong> or <strong>dictionary<\/strong> of all the <strong>functions<\/strong> you have <strong>used<\/strong> in your <strong>program<\/strong>.<\/p>\n<p>You can <strong>unpack<\/strong> a <strong>list<\/strong> by <strong>using *<\/strong> and <strong>dictionary<\/strong> by<strong> using **<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(\"Code by TechVidvan\")\nprint(\"This is coded on Google Colab\")\ndef fun(a,b,c,d):\n  print(a,b,c,d)\nmy_list = [1,2,3,4]\nfun(*my_list)<\/pre>\n<h3>9. Python can implement the \u2018else\u2019 clause within \u2018for\u2019 loop<\/h3>\n<p>Unlike other languages, Python is the only language that can use <strong>else within<\/strong> for a <strong>loop<\/strong>.<\/p>\n<p>This will be true only when the <strong>loop exists<\/strong> <strong>naturally<\/strong> and <strong>do not break in between<\/strong>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(\u201cCode by TechVidvan\u201d)\nprint(\u201cThis is coded on Google Colab\u201d)\nfor i in range(1,4):\n      print(i)\nelse:\n      print(\u201cExecuted only if no break\u201d)<\/pre>\n<h3>Conclusion<\/h3>\n<p>There are a lot of unique and interesting facts about the <strong>Python language<\/strong>. Python has a <strong>plethora of applications<\/strong>. Python has a <strong>user-friendly coding environment<\/strong>, so its <strong>popularity<\/strong> is <strong>growing<\/strong> among developers.<\/p>\n<p>Having a glimpse of its facts, it can be analyzed that it is the <strong>top-most choice<\/strong> of a <strong>coder<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is one of the most emerging programming languages. It is a high-level programming language that has user-friendly syntax. It is known to have fewer lines of code in an easy and simple form.&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":78379,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[2479,2480,2481,2482],"class_list":["post-78378","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-facts-about-python-programming","tag-interesting-facts-about-python-programming","tag-python-facts","tag-python-programming-facts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>9 Interesting Python Facts a Python Programmer should know - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn 6 unique and important python facts that a python programmer must know before starting the python programming.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"9 Interesting Python Facts a Python Programmer should know - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn 6 unique and important python facts that a python programmer must know before starting the python programming.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-19T04:30:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/unique-facts-about-python-programming.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"9 Interesting Python Facts a Python Programmer should know - TechVidvan","description":"Learn 6 unique and important python facts that a python programmer must know before starting the python programming.","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:\/\/techvidvan.com\/tutorials\/python-programming-facts\/","og_locale":"en_US","og_type":"article","og_title":"9 Interesting Python Facts a Python Programmer should know - TechVidvan","og_description":"Learn 6 unique and important python facts that a python programmer must know before starting the python programming.","og_url":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-04-19T04:30:10+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/unique-facts-about-python-programming.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"9 Interesting Python Facts a Python Programmer should know","datePublished":"2020-04-19T04:30:10+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/"},"wordCount":712,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/unique-facts-about-python-programming.jpg","keywords":["facts about python programming","Interesting facts about Python Programming","python facts","python programming facts"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/","url":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/","name":"9 Interesting Python Facts a Python Programmer should know - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/unique-facts-about-python-programming.jpg","datePublished":"2020-04-19T04:30:10+00:00","description":"Learn 6 unique and important python facts that a python programmer must know before starting the python programming.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/unique-facts-about-python-programming.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/04\/unique-facts-about-python-programming.jpg","width":802,"height":420,"caption":"Python facts"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/python-programming-facts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"9 Interesting Python Facts a Python Programmer should know"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/78378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=78378"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/78378\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/78379"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=78378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=78378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=78378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}