Table Of Contents

Next topic

Converting from Python to Javascript

This Page

Python or Javascript?

As a beginner, should you learn Python or Javascript?

The answer depends on what you would like to do as a first project after you complete a tutorial here. If you do not have anything specific in mind, my suggestion is for you to first start with Python. The reason is that Python programs are easier to read and understand. I realize that this statement may be found by some to be a matter of opinion ... so I will let you be the judge after having had a look at the same program written in both languages on the next page.

If you already have something specific in mind, perhaps because you want to use some application that uses one language or the other, then your choice should be clear: choose the language that you are likely going to use next. For example, suppose your goal is to write games to share with your friends on a web site. While you could use Python (with the Brython library) for doing this, the more natural choice might be to learn Javascript, since it is the “native” language of the web and essentially all existing tutorials on this topic will use Javascript.

An unusual suggestion

If you go through the tutorial for beginners in one language first (Python or Javascript) and go through the similar tutorial for the other language next, you will likely find that it will take you much, much less time the second time around as you will have understood all the tricky concepts, and it will only be a matter to get used to a new syntax. So, why not learn the basics of both languages, ... perhaps starting with Python?

Have a look at the next page where I show you how to convert a simple Python program into a corresponding Javascript version. If you are like me, you will likely find that, for simple programs, the two languages are extremely similar, but that Python is easier to read and to write, as it requires fewer “unusual” characters to type.

Next: