Is Python Truly the Best Programming Language to Start Learning How to Code?
Python is definitely a very popular programming language, and if you have in mind to start programming, you might have run in beginner-friendly courses and tutorials that teach programming starting with Python. And it is surely very attractive compared to other programming languages. But is Python the best programming language to learn first? Let’s find out!
Why is Python so Popular – Especially among Beginners?
As I mentioned in the beginning of this article, Python is a very popular programming language. If we have a look at Stack Overflow Trends, which measure the number of times a tag appears in posts, we can see the rapid growth of Python-related posts (Figure 1 – retrieved on February 25, 2022).
So let’s start from the very beginning and ask ourselves why Python is so popular, and how it became the go-to language for beginners.
1. Python is User-Friendly
I would say that, in my experience, there are really no easy programming languages to learn. That is because it is not really a question of understanding the programming language, but rather understanding the logic behind programming. You need to step back from your human logic, so full of abstraction and sub-text understanding, and you need to start thinking like machines think. And it is hard to get the hang of it in the beginning. The good thing is, that kind of “computer” logic is the same no matter the programming language.
Once you are over that first obstacle, learning a new programming language is quite straightforward, you only need a bit of dedication and time. So what do people mean when they say that Python is an easy language to learn and user-friendly?
Simply Elegant
What we are referring to when saying Python is a good language to start learning is its syntax. The syntax of a (programming) language is the set of rules that help you (and in this case, your computer) understand what you are reading/writing. A concrete example – in any programming language, but also in most natural languages – would be the use of a semicolon. There are specific rules as to where and when you can use a semicolon, in English as well as in Python, or in any programming language.
Now, it just so happens that Python has a very beginner-friendly syntax. Where other languages use curly brackets and semicolons, Python mostly uses indentation. And most logical operators (like the concept of “or” and “and” and “in”) are written in plain English instead of using mathematical symbols. Python will also infer the type of variable you want to use, without you having to declare it. This makes Python code really easy to read and understand, even if you are just starting out, and allows most people to focus on that “computer logic” we mentioned earlier, instead of trying to figure out the correct syntax.
You can see a comparison of the same piece of code written in Python and in C++ below.
#printing something in Python
print("Hello World!")
//printing something in C++
#include
using namespace std;
int main ()
{
cout << "Hello World!"
return 0;
}
More than just Readability
What’s so great about Python’s sleek syntax is not just the fact that it is easy to read and understand. It means Python is a great starting point because it allows new programmers to focus on important programming concepts rather than on the code itself. It is a very abstract language, that will help you develop your problem-solving and programming skills. What’s best is that these skills are transferable, so once you are comfortable swimming in your Python-sized pool, you will be able to swim in the ocean of other programming languages with relative ease.
Easy Set-up and Compatibility
2. Python has been around for a Long Time
Another good thing about Python is that it is a pretty old programming language. This, plus the fact that, as we said, it is quite user-friendly, means that you get tons of great resources and tutorials to start learning.
I wrote an entire blog post about great resources you can find to start learning Python, so you can have a look at that if you want to learn more.
Python’s long run in the programming community and its popularity also mean that many others have tried to debug their Python code and shared their struggles and solutions with the community. This creates a virtuous cycle: the stronger the community grows, the more resources there are available, the more programmers will use Python. I mean, the Stack Overflow questions’ trends speak for themselves. So chances are, someone else might have already found a solution to a problem you are facing. It’s like having your very own study group, just one convenient Google Search away. To me, this is certainly a great advantage when trying to decide if Python is the best programming language to learn first.
3. Python can be Multi-Purpose
The great thing about Python being so popular and so old, is that other developers have been using it a lot, for different types of projects (duh). Which means, there is now a package or a library for basically anything you might need or want. From Machine Learning to Data Visualization and manipulation, encompassing calculations, vectors, matrices, engineering, NLP – you name it, Python can do it. This abundance of packages and libraries, paired with Python’s sleek and elegant syntax, means that you can do almost anything you want with just a few lines of code.
Now, it is true that each programming language has kind of its own niche in the programming world; some are great for app development, some for web development, or data analysis and/or data management, or even operating systems. Python is no exception: it is most used for scientific research, and especially for Machine Learning. However, it remains incredibly flexible and versatile, and can be used for much more than that. With Python, you can build websites, create computer games, do so much more than just run scripts.
That said, I think we can agree by at least saying that Python is a pretty good language to start programming. But is it truly the best? Let’s look at some downsides that might dampen your enthusiasm.
Welcome to the Dark Side of the Force
Ok, so, here is the deal. Not everyone is as enthusiastic as I am about Python, and I can see why. There are some downsides to using Python, and there are some downsides to learning Python as a first language. Here are some of the most popular counter-arguments to using Python to learn programming.
1. The Job Market doesn’t seem to have Much Love for Python
As we said time and again, Python is mostly used for statistical analysis and scientific research. Which is great. On the other hand, this also means that Python developers are not as hot on the market as JavaScript or Java developers at the moment. Especially if you look at what is in-demand in FAANGs companies. Don’t get me wrong, you can still find good positions as a Python programmer, but if you are starting out, and you want to make a career out of your new programming skills, looking at the job market and at future prospects might be wise.
2. Think of the Projects!
Programming languages are no different.
While there's rigor in learning how to code in an old-school way--files of algorithmic scripts that generate monochromatic textual output in a terminal window--you have to recognize the isolation that comes with it and how far away this is from what people want to make.
So… Is Python Really the Best Programming Language to Learn First?
If you are not sure yet about what you want to do, and you just want to test the waters, Python remains a more than valid option. It is easy to learn, flexible, platform independent, and easy to set up, which means you can get started almost right away. Furthermore, Python fosters abstraction and problem-solving rather than focusing on syntax and architecture, which is truly fundamental if you want to fully grasp that “computer logic” we talked about in the beginning.
I hope you find this article interesting. Let me know in the comment section which language you started with!
See you in an 8-bit!