5 Reasons to Learn Python

shutterstock_314171156

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.

The PEP8 style guide for Python, which has been around since 2001, keeps code from looking bad. This example is from “Code like a Pythonista-Idiomatic Python”:

[py]

Good

if foo == ‘blah’:

do_something()

do_one()

do_two()

do_three()

Bad:

if foo == ‘blah’: do_something()

do_one(); do_two(); do_three()

[/py]

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.

Image Credit: Zhukov Oleg/Shutterstock.com

Comments

5 Responses to “5 Reasons to Learn Python”

October 13, 2015 at 4:48 pm, JohnW said:

Eve Online, a massive multiplayer online game that uses python.

Reply

October 13, 2015 at 6:40 pm, Jaime said:

I know other programming languages and now I’m interested in learning Python, what books do you recommend and also can you please tell me a book to learn Django? I haven’t seen good books for python and django.

Reply

October 15, 2015 at 9:26 am, Mark said:

This is what I’m teaching my new programming students right now. This really is a good language to start out with and it teaches good syntax and semantic lessons that can be used for the bigger languages (Java, C++). We are going to be using the SciPy and PyGames to help them get more acquainted with real world programming problems. Should be pretty fun!

Reply

October 15, 2015 at 2:09 pm, MichealP said:

I have been a fan of Monty Python’s Flying Circus from its beginning, which is the inspiration for the Python software—NOT the snake.

My first Python book/course was just for games. It was required reading by an IT client (Routers/Switches). However, I need a recommendation for a Python book that is more technical for the IT industry programming. Python is being used for more simple to write IT controls.

Reply

October 16, 2015 at 7:00 pm, Martin said:

Start with Learn Python The Hard Way by Zed A. Shaw for a quick basic approach. Then Gray Hat Python by Justin Seitz for ethical hacking exploits.

Reply

Post a Comment

Your email address will not be published.