I got asked on Twitter why I love Python so much, and I thought I would do a quick writeup, then open this up to a discussion on why your preferred language is your go-to.
Python was my first programming language, and it made me fall in love with writing code in the first place. I was able to write games and helpful scripts with very little programming experience. I also started my software engineering career with writing Python code for data science scripting. I'm not sure that my career would exist without the Python programming language, to be totally honest.
Python's syntax is so similar to written English. Its guiding principles are outlined in The Zen of Python, which is a poem that all programmers should take into account (I even named my blog after it and have it hanging on the wall in my apartment. Four lines in particular really speak to me:
Explicit is better than implicit.
Simple is better than complex.
Readability counts.
If the implementation is hard to explain, it's a bad idea.
I think those guidelines make the language easy to understand and write code with.
I also really appreciate how diverse the use cases are for it. Django makes creating web apps straightforward and extendible. Pandas makes data manipulation a breeze, and the data science libraries are unparalleled. It's also great for solving code challenges because of the utilities in the standard library. IPython notebooks are awesome for teaching and creating shareable and accessible code.
Some other notable features include:
- list comprehensions, which are a really elegant way of transforming data
- you can extend Python relatively easily with C or C++ which you can use to write faster-running utilities if needed
- meaningful whitespace: I'm going to indent my code anyways, I should get something in return for that!
- a great and supportive community behind the language
So, what is your go-to programming language and why?
Note: There are a lot of programming languages I have written code in, and I like a lot of them as well. Python is just the language that I do code challenges with. Also, totally understand that different languages are good for different things. This isn't meant to be a debate, just a display of love for languages that have been helpful for us!