10 Facts You Didn’t Know About Python
Python is one of the most popular and used programming languages in the world right now. The thing that makes python much popular is that you can develop anything with it. Python is used by many big companies like Google, Facebook, Netflix, and more. In a recent survey, it is also found that the rover which is sent by NASA to mars has used python programming to process images. There are over 10 million python developers around the world. Having such a large community still, there are some facts that many Python developers don’t know. In this blog, I will tell you about 10 python facts that you didn’t know.
“If You Think You Know It? Think Again” — Author
1. Named After A TV Show
A newbie to python programming always thinks that the name python is after the snake called python, but it is not. The name is given after a popular TV show cam from BBC’s TV Show — ‘Monty Python’s Flying Circus’. The creator of python Guido van Rossum wants a unique and short name, he was also a big fan of the TV Show So he decided to give python name to his invention.
2. It is Older Than Java
Python's popularity and demand have increased in the past 10 years so it seems like it is a new language that got the attraction of developers. The fun fact is python is much older than java. Python was initially released in 1991 on the other side java was released in 1995. Our Python is 30 years old.
3. It was a Hobby Project
Well, You Might not believe me if I tell you that python is not created as a commercial or a professional project. rather than it was a fun side project of the creator, Guido van Rossum. Guido was looking to create something interesting for him that can keep him occupied during Christmas. We can say that python is a gift from Santa to all the developers around the world.
4. It has multiple variants
Python programming has different variants for different scenarios.
- CPython: It is written in C and Python. It compiles the python code into byte code. It uses both a compiler and interpreter.
- JPython: It is designed to run the python code on the Java Platform.
- MicroPython: It is for the microcontrollers.
5. Slow but still One of the most used language
If you have ever written a single line of code in python then you might have heard from the community that python is slow. Well, it is somehow true because in comparison to other languages like C, C++, Java it is much slower. The reason is simple, they are compiled languages and python is an interpreted language. It means that the Python interpreter translates each code line by line on the other hand they use a compiler that translates the whole code at once.
Even After Being a Slow Programming Language, It is one of the most used programming languages. Many Big Companies like IBM, Facebook, Netflix use python in their development apps.
Premature optimization is the root of all evil — Donald Knuth
The Quote Said By Donald Knuth is one of the reason companies uses python in their main apps.
6. Everything Is Referenced
If you are coming from a programming language like C, C++, Java then you must have heard about pointers. A pointer is a variable whose value is the address of another variable.
In python, everything is done by reference. It doesn’t support pointers.
7. Running On Mars
You will get surprised to know that python is running on mars. Texting robots on Mars using python to send images to the earth. It uses
request module to communicate with the API on mars.
8. You can define infinite values
As a programmer, you might know that we cannot define infinite values in the program but in python it is possible. You can define infinite value in a python program using
number = float('Inf')
9. Python > French
In the year 2015 python overtook French to be the most popular language that is taught in primary schools. Statistics revealed that 7 out of 10 parents preferred their children to learn python instead of French.
The statistics going to be increased up to 10 times in the upcoming years.
10. The Zen Of Python
It is actually a poem written by Tim Peters named The Zen of Python which can be read easily by just importing
this module in the interpreter.
The Zen of Python, by Tim PetersBeautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!