Despite its advanced age (25 years old and counting), Python continues to grow in popularity, having jumped from eighth to fifth spot on the most recent Tiobe Index. Here are five reasons you should learn Python, whether you’re new to programming in general or a seasoned programmer who wants to expand on current skills.
Ease of Learning
Python code has a very “natural” style, in that it’s easy to read and understand, thanks in no small part to a lack of semicolons and braces, not to mention the use of indentations for marking blocks.
if foo == ‘blah’:
if foo == ‘blah’: do_something()
do_one(); do_two(); do_three()
Even relative programming novices tend to have an easier time learning Python’s ins and outs.
It Runs on Any Platform
This is true of most popular languages (e.g. Java, C++, C) that are also open-source. You can run Python on very small devices such as a Raspberry-Pi or even the smaller Micro:Bit.
It’s a Great General-Purpose Language
You probably wouldn’t use Python to write an operating system or AAA game, but otherwise it’s a very flexible language, capable of creating anything from desktop software to Web applications and frameworks. In recent years, Python has expanded its reach to scientific and numeric computing with SciPy, a collection of packages for mathematics, science, and engineering. If that wasn’t enough, there are GUI toolkits such as wxPython that wrap the cross-platform C++ wxWidgets GUI library.
Python comes in two flavors, 2.x and 3.x, with 2.7.10 and 3.5.0 being the current versions, respectively. If you are learning Python, you’d probably be well served by the 3.x version; it’s not backwards compatible with the 2.x, but tools will convert 2.x to 3.x.
In case you need any particular libraries, check out the Python Package index; there are still some packages that are 2.x only (currently there are 67,409 packages listed).
It’s Interpreted Yet Fast
Interpreted programs used to be considerably slower than compiled, but in recent years, advances in technology have led to much faster runtime execution. Yet even that’s not enough for some people: There’s an alternative project called PyPy that aims to speed up Python even faster; it’s an alternative to the two current Python versions (2.7.10 and 3.2.5) and is notably faster than CPython, the default Python interpreter written in C. (For a full list of other implementations of Python, check out this Wiki.)
It’s Constantly Improving
Python is not a completed language. Just last month saw the release of version 3.5.0, complete with new operators for matrix multiplication, coroutines with async and await syntax, a fast new directory traversal function, and other features.