16 Facts about Python Programming that every Geek should know

Python course with 57 real-time projects - Learn Python

Python ranked #1 on the IEEE Spectrum list of top programming languages for 2019. Today, we’ll take up some interesting facts about python programming to better understand what makes it so popular.

Python is getting popular, almost every industry is using it. It is the advice of experts to start learning python as soon as possible. That’s why DataFlair has launched an Online Python Training Course to become you the master of Python.

Interesting facts about Python Programming

Below are the 16 most interesting facts about Python Programming that you should know –

1. Python was a hobby project

In December 1989, Python’s creator Guido Van Rossum was looking for a hobby project to keep him occupied in the week around Christmas. He had been thinking of writing a new scripting language that’d be a descendant of ABC and also appeal to Unix/C hackers. He chose to call it Python.

2. Why it was called Python

The language’s name isn’t about snakes, but about the popular British comedy troupe Monty Python (from the 1970s). Guido himself is a big fan of Monty Python’s Flying Circus. Being in a rather irreverent mood, he named the project ‘Python’. Isn’t it an interesting Python fact?

3. The Zen of Python

Tim Peters, a major contributor to the Python community, wrote this poem to highlight the philosophies of Python. If you type in “import this” in your Python IDLE, you’ll find this poem:

Interesting facts about Python Programming

4. Flavors of Python

Python ships in various flavors:

  • CPython- Written in C, most common implementation of Python
  • Jython- Written in Java, compiles to bytecode
  • IronPython- Implemented in C#, an extensibility layer to frameworks written in .NET
  • Brython- Browser Python, runs in the browser
  • RubyPython- Bridge between Python and Ruby interpreters
  • PyPy- Implemented in Python
  • MicroPython- Runs on a microcontroller

5. Big Companies Using Python

Many big names use (or have used) Python for their products/services. Some of these are:

  • NASA
  • Google
  • Nokia
  • IBM
  • Yahoo! Maps
  • Walt Disney Feature Animation
  • Facebook
  • Netflix
  • Expedia
  • Reddit
  • Quora
  • MIT
  • Disqus
  • Hike
  • Spotify
  • Udemy
  • Shutterstock
  • Uber
  • Amazon
  • Mozilla
  • Dropbox
  • Pinterest
  • Youtube

What are you waiting for? Start learning Python now and build your career in it. 

6. No braces

Unlike Java and C++, Python does not use braces to delimit code. Indentation is mandatory with Python. If you choose to import it from the __future__ package, it gives you a witty error.

Interesting facts about Python language

7. Functions can return multiple values

In Python, a function can return more than one value as a tuple. Take a look at the following code:

facts about python language

This isn’t possible in a language like Java. There, you can return an array of values instead.

8. Python supports multiple assignments in one statement

Python will let you assign the same value to multiple variables in one statement. It will also let you assign values to multiple variables at once.

This also means swapping in Python is quicker and can be done in only 1 line of code:

Interesting facts about Python

Learn in detail about Python variables and data types

9. With slicing, it’s easier to reverse a list

If we slice a list of values from starting to end but with a step of -1, we get the list right to left (reversed).

learn python

10. You can chain comparison

Conditions may contain more than one comparison at once. You can have a condition that checks whether a value is greater than another and lesser than yet another all at once.

python programming facts

11. String literals concatenate together

If you type in string literals separated by a space, Python concatenates them together. So, ‘Hello’ ‘World’ becomes ‘HelloWorld’.

string literals - python language facts

12. Antigravity!

If you get to the IDLE and type in import antigravity, it opens up a webpage with a comic about the antigravity module.

Interesting facts about Python

13. Python influenced JavaScript

Python is one of the 9 languages that influenced the design of JavaScript. Others include AWK, C, HyperTalk, Java, Lua, Perl, Scheme, and Self.

14. for- and while- loops can have else statements

The else statement is not limited to if and try statements. If you add an else block after a for- or while- loop, the statements inside the else block are executed only after the loop completes normally. If the loop raises an exception or reaches a break statement, the code under else does not execute. This can be good for search operations.

python coding facts

Python Loops – Detailed guide

15. _ gets the value of the last expression

Many people use the IDLE as a calculator. To get the value/result of the last expression, use an underscore.

python coding facts

16. People prefer Python over French

According to a recent survey, in the UK in 2015, Python overtook French to be the most popular language taught in primary schools. Out of 10, 6 parents preferred their children to learn Python over French. One of my favorite facts about Python programming.

Hope you had fun finding out new things about Python. Do you want to add to the list? Comment below. 

To learn more about Python you can refer to our online python course designed by experts.

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

follow dataflair on YouTube

25 Responses

  1. Govind says:

    It is very useful to me and tq so much

  2. Pythonian says:

    swapping is 1 line statement:

    a,b = b,a

  3. Nathan says:

    7 isn’t strictly true. You are returning a tuple. Parentheses are not necessary to delineate a tuple. Assignment of the output is also to a tuple, it’s just a tuple of names.

  4. Harsha Vardhan Reddy P says:

    Hiii,I want to know more about the python

    • DataFlair Team says:

      Hi Harsha,
      Refer to the sidebar for understanding all the concepts of Python programming and mastering the language. The Python tutorials are arranged in a sequential manner for better understanding. And, if you face any kind of difficulty while learning, share your queries with us. Our experts will assist you in the best possible way.

  5. Suprav says:

    You post about some basic python

  6. Shashank Kesarwani says:

    Yup I wanna add

  7. InsignificantSoul says:

    Python currently lives as the most beautiful language in the IT industry. If you are a beginner and love programming then you should prefer “Python” over any other languages.

    • DataFlair Team says:

      Yes, you are absolutely right. Keep visiting DataFlair for regular updates on Data Science and Big Data world.

  8. sukardi Layarda says:

    what a good tutorial thank u.. this a good website to learn python, i will recommended my friend

  9. Kumud Sinha says:

    I just can’t stop laughing when I saw swapping code ….. Thanks, data-flair team for making python journey
    easy and enjoyable.

  10. Levina says:

    It’s good

  11. Symon Kipkemei says:

    import antigravity and import this were fun to discover.

  12. gabriel chacur says:

    hola buenas muy buen tutorial a darle con todo a Python

  13. 211MA026 V.DEEPA says:

    It’s very useful to me.. thank you so much..

  14. Murugi Victoriana says:

    Interesting

  15. subramaniam laxshika says:

    it’s really interesting

  16. Srihari Prathapaneni says:

    Thank you so much for providing great start for python journey

  17. surojeet kumar says:

    Good tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *