Overview of Pythonic Programming

This lesson explores the overview of the course.

We'll cover the following

Background

People from all walks of life can use Python to quickly and easily create simple programs and websites. We need to be careful with Python’s simplicity, though. Python is very forgiving of poor style and minor mistakes. As those simple programs and websites evolve, they often become maintenance nightmares.

We’ll cover many different tips for writing and maintaining clean code. This course is especially useful to those who already know Python but want to master the finer points of Pythonic coding.

Python is a concise, flexible, and versatile programming language. It is quite popular, firmly holding its position as the third most popular language in the world since September 2018. According to TIOBE Index, it comes with a great collection of about 200 modules in the standard library, a vast quantity of third-party modules, and a well-documented extension mechanism. Finally, Python is very efficient, despite being an interpreted language.

Every programming language and system has its own essence. The essence of Fortran 66/77 is bulky multidimensional arrays of real numbers, uppercase letters, and a lack of recursion. The essence of C is pointers and the happy sisters, malloc() and free(). The essence of Java is lengthy classes and the Java virtual machine. What is the essence of Python, then?

This course offers almost 100 tips that explain how to write Pythonic code in Python. It is hard to explain what “Pythonic” means. Just like Zen, mentioned in the first lesson (Import and Ownership Tips) and elsewhere in the course, Pythonic is a concept not merely learned, but experienced. In this course, you’ll become a more Pythonic programmer, which will make you a better Python programmer in general.

The tips are grouped into six chapters:

  1. Documentation Tips
  2. General Tips
  3. Data Types and Data Structures Tips
  4. Function Tips
  5. Performance Tips
  6. Safety Tips

Each chapter embraces different aspects of pythonicity: how to make your programs correct, safe, fast, easy to read, and easy to maintain.