Practices of the Python Pro

Practices of the Python Pro at Python.Engineering

Practices of the Python Pro

See more books

Professional-quality code does more than just run without bugs. It’s clean, readable, and easy to maintain. To step up from a capable Python coder to a professional developer, you need to learn industry standards for coding style, application design, and development process. That’s where this book is indispensable.

226 pages, published in 2020
Python, like me, was born in December of 1989. Although I’ve accomplished a great deal in the subsequent three decades, Python’s success is prolific. More people than ever before are picking it up to accomplish fascinating things in data science, machine learning, and more. Since I learned Python, this “second-best language for every- thing” has in reality been my first choice for many endeavors. I had a rather traditional path into programming through the Electrical Engineer- ing and Computer Science Department at the University of Michigan. At that time, the coursework focused mainly on C++ and MATLAB—languages I continued to use in my first job out of school. I developed some shell scripting and SQL chops in my next position, processing big data for bioinformatics. I also started using PHP to work on a personal WordPress site from scratch. Although I was getting results (and cool ones, in some cases), none of the lan- guages I was using resonated with me. But I was oblivious. I assumed that programming languages were purely means to an end, and they had little chance of being fun to work with. Around this time, a friend invited me to join him in a hackathon project to build a Ruby library. The world exploded with color, fruits tasted sweeter, and all that. The ease of using an interpreted language and the human-friendly syntax of Ruby really made me think about the tools I’d been using. Although I didn’t stick with Ruby for too long, I decided to give Python and the Django web framework a try for the next iteration of my personal site. It gave me the same joy and shallow learning curve I’d seen with Ruby, and I haven’t looked back since!

Latest publications

Underline (_) in Python

The following are the various places where _ is used in Python:

  1. Single underscore:
    • In the translator
    • After the name
    • Before name
  2. 18/07/2021

__name__ (special variable) in Python

Consider two separate files File1 and File2.

# ...


Stripping and searching ordered words in a dictionary using Python

Ordered word — it is a word in which letters are displayed in alphabetical order. For example, abbey and dirt . The rest of the words are unordered, f...


SunPy | Plotting a solar image in Python

At the command line, enter:

 pip install sunpy 

Download sample data

The SunPy package contains a s...