Python is quickly ascending to the forefront of the most popular programming languages in the world. The incredible growth of Python is shown very clearly by StackOverflow:
Its continuous rise in popularity is reflected in the TIOBE index and Coding Dojo identifies Python as one of the most in-demand programming languages of 2019.
The demand for Python is growing with no signs of stopping, second only to Java, whereas the number of Java job postings is projected to decrease. It is likely that Python will overtake Java in the coming years, reaching the #1 spot.
The popular option isn’t always the best option. But when it comes to programming languages, popularity can pay off.
By using a popular language, you have a much higher chance of finding a solution to any problem you may encounter. In fact, if your issue is common enough, there’s probably a ready-made solution available in Python right now.
Python enjoys a healthy community of enthusiasts that strive every day to make the language better, fixing bugs and opening new possibilities.
At the same time, Python has some strong corporate sponsors that will push the adoption of this language even further—Google is one of them. Because Google uses Python, they are actively working on guides, tutorials and other resources to get the most out of it.
In fact, Guido van Rossum, the creator of Python, used to be employed at Google, where he devoted half of his time to developing our favorite programming language
Python is accessible by design, making it one of the fastest languages in terms of speed of development. Just look at what Guido van Rossum had to say at the conception of the language:
(How cool is that title, by the way?)
A user-friendly environment in the hands of your development team means less time wrestling with your building tool and more time spent actually building.
In fact, Python’s simplicity was the reason STX Next came to be in the first place. Before he started the company, our CEO Maciej Dziergwa was a Java developer. Once he realized that he could recreate a 2-month Java project in a mere 2 weeks using Python, there was no going back.
Python is known for its rich selection of libraries, saving you the hassle of coding features by hand and accelerating time-to-market. If you’re looking for scientific libraries, there’s Pandas, NumPy, and SciPy, for example. Python even has specialized libraries for machine learning (scikit-learn, TensorFlow, nilearn) and natural language processing (nltk).
Aside from libraries, Python also offers a range of web development frameworks which you can use to jump-start your project and avoid unnecessary coding. Some frameworks, such as Django, give you everything you need to build a web application, from low- to high-end. Others are more specialized, such as the Flask micro-framework.
Whether you decide to use just a few libraries or decide on an entire framework, Python will help you get results faster.
The way Python is structured and Python code executes is not without its drawbacks. One oft-cited disadvantage of Python is its runtime, which is often slower compared to other languages.
And yet, Python is still the language of choice for companies such as Google. Why?
The limiting factor is your employee’s time.
You want to optimize your most expensive resources—and developer hours don’t come cheap. So you need all the help you can get to shorten time-to-market, even if it leads to slower runtime execution.
But that’s not all. For situations where performance really does matter, Python offers tried and tested solutions to incorporate other, faster languages into the code.
One such solution is using Cython. Usually, your performance bottleneck lies in only one of the methods in your code. You can use Cython to rewrite the method in C, optimizing your speed without the need to rewrite the whole code base.
Using Cython you get the perfect mix of optimizing only at the bottleneck, and the beauty of Python everywhere else.
And so, again, whatever your woes, Python has an answer.
Python’s syntax is clear and concise. The language is designed to be readable and close to actual English, making it easy to decipher. Python also requires fewer lines of code to achieve results compared to languages such as C or Java.
Python’s approach is so deeply embedded that you can even learn about it from Python itself. Here’s what you’ll see when you execute
import this in the Python interpreter:
>>> import this
The Zen of Python, by Tim Peters
Beautiful 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!
The simplicity of Python helps greatly when you have to read the code you’ve written, or code from another developer. Code review goes much faster when you have fewer lines of code to actually review, and the code reads like English. There’s also less “catch-up” involved when the code changes hands—you can figure out pretty quickly what each function is supposed to do.
With code that’s easier to understand and navigate, you can reduce the amount of work needed to maintain and expand your code base. And reducing work is one of the best things you can do, since we’ve already established above that optimizing programmer productivity should be your priority.
No one can really predict when your user numbers will start surging and scalability will become a priority. Which is why it’s a good idea to use a language that scales great and, as we’ve mentioned above, is easy to maintain.
Some of the most ambitious projects around the web—YouTube, Reddit, EVE Online—all use Python to serve their user base reliably.
To be precise, Reddit was initially written in Lisp, and was then rewritten in Python—over a single weekend. Here’s how the switch from Lisp to Python was justified on the Reddit blog:
So let’s answer the question once and for all. Why Python? Because:
If you really need to find the one language to rule them all, the choice is clear.
Not so long ago, Matthew Harris created a more specific guide to Python from the perspective of the fintech industry. Take a look at the reasons why Python should be the technology choice for your fintech.
Alternatively, if you’re curious which other fields benefit from using this programming language, check our comprehensive guide on what Python is used for.
Or, if you’re a Python developer, perhaps you’ll be interested in our new tutorial on getting started with machine learning in Python.
And if you’re here just for the language wars, look no further than our comparison of Python and other programming languages.