top of page

Why learn Python? It's not easy, but easier than you may think


The Zen of Python

Learn Python can mean two different things: either you are already an experienced programmer in other programming languages and you wish to learn Python now, or you have never done any coding before and want to start from somewhere.


This blog post is not for the experienced programmer who wants to learn Python - you already know what to do.


Learning coding vs learning a coding language

If you're still reading, then you are new to coding or perhaps you want to find out more about coding for kids. One of the most common phrases we tell our students and prospective clients is "we don't teach a coding language, we teach coding". The difference is both big and important.


Programming is a way of thinking, a mindset in which you take an idea, any idea, and break it into small, logical steps in a form that a computer can follow. Then you plan which coding tools you should use and only then do you start writing the code.


The first part of this programming process is the same whatever coding language you are using. This is also the hardest part of programming, in many ways. But when we get to the latter part, then we need a coding language.


And there are many languages out there. Some old, some new; some weird, some less so; some useful, some not; some hard to learn, some less so. How do you choose?


Why Python?

Let's start with readability, and the difference this makes when learning to code. Here is some code in three of the most popular coding languages today.


Java

class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } }


C++

#include <iostream> int main() { std::cout << "Hello, world!\n"; return 0; }


Python

print("Hello World!")


All three perform the same thing: they print out the phrase 'Hello World!' to the screen – the classic first program people typically write (except that no one really does.)


Python's clarity and simplicity is in some ways even clearer in longer programs, but the above examples will allow me to show one of the main problems with learning how to code with a "difficult" language.


When teaching coding, or anything for that matter, it is important to take the students every step along the way. "Just write this down for now and we will explain it later (weeks later)" is not the way to go. Unfortunately, when teaching some coding languages (such as Java and C++ above) this cannot be avoided.


If we're into the first 5 minutes of the first coding lesson, if using Java we would have to explain all of the following terms: class, public, static, void, main, string, args, system, out and println – 10 words, and that's without looking at punctuation. The C++ version is only marginally better (include, iostream, int, main, std, cout, \n, return – 7 or 8, depending on how you count them).


Python: just one command, print.


Now extend this to more complex concepts and we can readily see how in some languages, we simply have to just write stuff we don't understand for a while, until we are proficient enough to make sense of these things. For a beginner, this is very off-putting and makes coding hard to learn. This is even more relevant since in addition to these commands, there are more abstract concepts that we need to learn.


Python allows a beginner to focus on these higher coding concepts without having to battle with the syntax of the language. It's not just about making the language easier, it's about allowing a student to focus on what really matters when learning programming.


So is Python a dumbed-down language?

Short, easy answer: No.


Python is one of the most popular languages in the world today because it is both relatively easy to learn and code in but also because it is a very broad and powerful language that can be used for many diverse purposes, from scientific research and financial applications to developing back-ends for websites, and lots in between.


Is Python the right language for every purpose? No. The reason there are many languages is because they all have things they are good at. A program that needs to run very efficiently in real time would not be written in Python. If you want to write an app for an iPhone, you cannot use Python. But Python is still one of the languages with the broadest reach.


And once you've learnt the fundamentals of coding in Python, and learnt them well, then you can relatively easily learn other languages, including harder ones.


The Zen of Python?

Python is one of the most readable languages not by accident but by design. The language was designed with beauty and simplicity in mind.


In fact Python has an ethos called The Zen of Python and I'll quote a few lines from it:


Beautiful is better than ugly.
Simple is better than complex.
Readability counts.
In the face of ambiguity, refuse the temptation to guess.
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.

If you want to read the full Zen of Python, go to this Python editor, type in:


import this


and press the play button.


Ready to start learning Python?

Come and learn Python, or rather coding in Python, with us. We teach both children and adults because we believe that introducing a subject such as programming using clarity and engaging projects is important at any age.


Our Summer coding courses for kids and teenagers start on the 14 July and we have courses throughout the Summer months.




54 views

Python Coding for Young People

CT-Unlimited-FinalRAW-transparent.png

Codetoday Unlimited is for the curious teenager or preteen keen to learn proper Python coding. Stephen's courses start from the basics and carry on to intermediate and advanced levels.

Python Coding for Adults

The Python Coding Place is Stephen's platform full of courses and other resources for beginners and intermediate learners. The focus is on clarity and Stephen's unique communication style.

bottom of page