When aspiring developers ask which programming language they should pick in order to start learning how to code, the most common – and in some ways the most sensible – answer tends to be ‘it depends on what you are trying to build’.
Being the contrarian that I am, I’m going to go against that consensus, and argue that learners, and especially self-learners, should always begin to code on Python. (Or almost always. I like to make concessions.)
This is my personal opinion, of course, and I should disclose that I am at least a little bit biased because my own introduction to coding was on Python. And while Python is part of our bootcamp on data science, it’s true that we do not use it when teaching web development, mainly because our bootcamps are designed to dive right into the thick of things and start immediately with languages targeted to a particular purpose.
That said, and while it’s certainly worth hearing other points of view, there are some very good reasons to start with Python if you want to learn to code. The first and most obvious is that it was designed to be as easy to read and learn as possible.
What is meant by ‘easy to read and learn’ has to do with programming syntax, meaning the combination of symbols (and types of symbols) which you’ll employ to write your code. Things like parentheses, apostrophes and semicolons mean and do something very different in a programming language than they do in a natural language, and having to readapt one’s understanding of these symbols is one of the reasons coding often feels so unintuitive to the newcomer.
I feel like senior developers tend to forget this more often than they care to admit, but the fact that Python’s syntax is much simpler than that of practically all of the other major programming languages out there is something that will make a world of difference to a beginner. Not only does the process of learning become a lot less confusing, but most importantly, it lets you start building stuff right away.
The whole reason people asking where to start from are told ‘it depends on what you want to build’, is that programming is primarily something you learn by doing, more than by reading about concepts and principles. With Python, you can start doing right away, meaning that you can get a program to say ‘Hello world’ within minutes, and then build something that actually performs something useful (if initially simple) within days. In brief, it is a language that rewards learners for their efforts, which on the long run makes it far more likely that they will succeed.
It’s also worth pointing out that many people who approach coding don’t do so with a view towards becoming professional developers. They do so because they may want to build something specific which they intend to use, or because they feel that coding skills may be useful to them in their business (spoiler: they’re right). For that sort of person, you don’t necessarily need the language that is fine-tuned for the field they’re pursuing, but the one that is the simplest to use and will give results most quickly. In any case, once the fundamentals of programming logic have been absorbed through Python, it’s always possible to learn another language further along the line.
As importantly as any of the above, Python is among the most widely-used of all programming languages. This matters because it provides learners not only with a wealth of online resources to help them learn, but also with a huge community able to provide guidance, support and advice.
Furthermore, Python’s popularity means that the language has an exceptionally diverse choice of libraries, leading us to a crucial caveat: the fact that this language is excellent for beginners doesn’t mean it is only for beginners. In fact, Python is currently employed by a wealth of professionals in machine learning, data science and web development, and it’s a natural choice for startups (less so, admittedly, for larger teams within corporations – Python does not allow for something called static typing, which can become an issue on projects being worked on by hundreds of developers at a time).
There are other reasons why Python is suitable for beginners, from the fact that you don’t have to specify types, to its adaptability in the booming field of machine learning, but I hope this short introduction has given you sufficient reason to give it a shot. Go take a look at the official welcome on Python.org, and start teaching yourself coding with Python. Or, consider our Data Science course, and let us do the teaching.