This is Why Python Will Stay Among The Top Languages in 2021

Python has a long history, starting around 1991 with its first release in a newsgroup called alt.sources. Since then, we all know how omnipresent the language has become. Last year, Python ranked second in Redmonk’s list of the most popular programming languages. And I can tell you… this year won’t be different. Here’s why Python will stay among the top languages in 2021.

Why is python so popular?

Python has a very vibrant community, and it’s very well maintained. The community is constantly looking for ways to evolve the language in such a way that:

  • It stays the clean and readable language that it is.
  • It keeps being easy to learn for beginners.
  • It keeps up with other modern languages.
  • It doesn’t alienate its community.

Last year we saw the deprecation of Python 2. Deprecating Python 2 has taken a long, looooooong time. The project has given its users plenty of time to adapt to the new language. In the meantime, Python 3 kept improving by:

  • getting faster, 
  • adding more features, 
  • and creating tools to aid in the move from version two to three

In the timeline below, you can see how long Python 2 and 3 lived next to each other: 12 years. Python is not leaving its users behind, that’s for sure!

Python 2 and 3 co-existed for a long time — Image © and used with permission.

Python’s popular packages

There’s a thriving ecosystem of 3rd party Python packages, most of them hosted on a website called the Python Package Index (PyPi). A number of the most popular packages have become ingrained in the memory of Python developers. 

Exactly a year ago, I wrote a long article listing the 22 most used Python packages in the world

Just to name a few:

  • Requests — A terrific, full-featured, human-friendly HTTP request library
  • Six — A package that helps you create codebases that work on both Python 2 and Python 3 (2 * 3 == 6, get it?)
  • JMESPath — Allows you to declaratively specify how to extract elements from a JSON document.
  • Colorama — Add some color to your terminal! Great for command-line tools

Check out the full article if you haven’t already, it’s a great read, and many people liked it:

The 22 Most-Used Python Packages in the World
Educational and surprising insights into how Python is used

Python is still easy to learn

With an older language, there’s that risk of becoming a bit rusty and old-fashioned. Python doesn’t suffer from these issues. It keeps improving in such a way that it stays simple for beginners. It even prefers clarity over raw speed. 

With the move to Python 3, there have been critical fixes to make the language more logical. Let’s look at a couple of examples.

Unicode is the default

In Python 2, you had to explicitly declare a unicode string, in Python 3, all strings are unicode:

# Python 2
unicode_sting = u'Ümlaut? Nō prōblem!'
# Python 3
unicode_sting = 'Ümlaut? Nō prōblem!'

Math became more logical

In Python 2, the division operator / defaults to an integer division unless one of the operands is a floating-point number. So you have this behavior:

# Python 2
5 / 2 = 2
5 / 2.0 = 2.5

In Python 3, the division operator defaults to a floating-point division and the // operator became an integer division. So we get:

# Python 3
5 / 2 = 2.5
5 // 2 = 2

Meaningful comparisions

Python is very forgiving — sometimes it was too forgiving though. In Python 2, you could compare anything to everything. The following examples would all return True:

>>> "a string" > 2
>>> None < 5

It makes no sense and can hide nasty bugs. In Python 3, these comparisons will throw a TypeError exception.

Popular Python IDE’s

Python has always been very well supported in the most popular IDE’s. There are several free choices if you want to develop Python applications in an IDE (and you really should).

My personal preference goes to Visual Studio Code. It has come a long way in a relatively short time period. VSCode has great Python support, through many popular extension.

VSCode Python extensions
VSCode has many great Python extensions

Another popular choice comes from JetBrains, the maker of the popular IntelliJ IDEA. In fact, they created a specific IDE for Python, called PyCharm.

Python is booming

Python reached second place for a reason. It’s extremely popular in several areas of the computer industry:

  • Data Scientists love Python.
  • The machine learning community is embracing Python more and more
  • DevOps have always loved Python (to name one giant: Ansible)

With terrific frameworks for creating websites (Django) and microservices (Flask, Bottle, Falcon, etcetera) Python keeps a strong foothold in this immense area of the industry too.

Final words

I admit I’m extremely opinionated — I even run this Python website! I’m probably preaching to the choir as well. But still… It’s nice to sometimes reaffirm that Python is here to stay, there’s no doubt about it!

What do you think? Will Python become even more popular this year, or will newer languages eat up market share? Let me know in the comments!

Get certified with our courses

Learn Python properly through small, easy-to-digest lessons, progress tracking, quizzes to test your knowledge, and practice sessions. Each course will earn you a downloadable course certificate.