Update: After programming more and reading this post again, I realize I was still a noob when I wrote this and titled it “Why Python Is Better Than Perl.” Languages are tools. Tools are not objectively better or worse than others. It depends on the task.
A month ago, I began learning Perl. Two days ago, I began learning Python. I’m already a convert.
Python makes programming fun. It’s more readable, doesn’t have funky $, @, % symbols everywhere, and whitespace like tab and return handle program logic so that I can stop worrying about semicolons and curly braces. In addition, Python seems to be more widely favored by natural language processing researchers. There are quite a few at my workplace, and as a Perl user, I couldn’t communicate with them at all. They’d speak Python while I’d be blathering in Perl. In order to tap into the NLP community and all the NLP goodies (like this), I switched to Python to the dismay of a systems administrator (click here if you have no idea what that is) and Perl-loyalist who sits near me at work.
Despite the similarities between Perl and Python regular expressions, a way of matching text, I still favor Perl’s. But my Python translation of my Perl script that web scrapes the New York Times is only half the length and more understandable for humans. The Perl script runs twice as fast, but that’s something I can live with.
Now I can relate to this xkcd comic.