Home > Articles

22 Python Tricks

  • Print
  • + Share This

Twenty-two Python programming shortcuts and time-saving techniques.

Save 35% off the list price* of the related book or multi-format eBook (EPUB + MOBI + PDF) with discount code ARTICLE.
* See informit.com/terms

This chapter is from the book

Master crafters need many things, but, above all, they need to master the tools of the profession. This chapter introduces tools that, even if you’re a fairly experienced Python programmer, you may not have yet learned. These tools will make you more productive as well as increase the efficiency of your programs.

So get ready to learn some new tips and tricks.

Shortcuts, Commands, and Packages

Python is unusually gifted with shortcuts and time-saving programming techniques. This chapter begins with a discussion of twenty-two of these techniques.

Another thing you can do to speed up certain programs is to take advantage of the many packages that are available with Python. Some of these—such as re (regular expressions), system, random, and math—come with the standard Python download, and all you have to do is to include an import statement. Other packages can be downloaded quite easily with the right tools.

  • + Share This
  • 🔖 Save To Your Account