Three Things I Love About Python

For years I’ve been programming in MATLAB. Recently, I started programming learning to program in Python. You can read an article that I also wrote about things I dislike in Python (coming from MATLAB). But, there are a couple of things that I really love about Python in comparison to MATLAB.

Cost

Photo by luis gomes on Pexels.com

That’s right: it’s free. Coming from MATLAB, I would have to pay for packages that I wanted to use. But this is not so in Python.

Most prominently, I’ve had to learn some parallel programming. In MATLAB, there are some brief structural changes, pay the fee for the toolbox, and you’re in business. In Python, the software was freely installable via pip, learn to make the code adjustments (not necessarily easy), and you can see the results!

Structure/Syntax

I love the forced indentation of Python. There are many languages that have no defined structure: Python is not one of those. If the subordinate statements to the “if” structure aren’t aligned and indented properly, your code will not run.

I also love the use of the ‘:’ symbol.

Interesting Control Structures

One of the things I loved about MATLAB was the ability to do things in exceptionally short lines of code. As such, I love list comprehension.

“Pythonic” code is the statement of writing code in ways that are native to Python and friendly to the reader is another one of my favorites. That there is such a list of descriptions due to a culture/society around Python is fantastic. A really great site of examples is available at https://www.codementor.io/blog/pythonic-code-6yxqdoktzt.

Conclusion

I’m growing to love Python (in lieu of MATLAB). Is it perfect? Absolutely not. But it’s pretty good and it’s capacity continues to grow.

You should expect to see more articles about Python!