Skip to content

The Zen of Python

Published: at 08:40 PM

💓 If you enjoyed the information and the web site, please donate.

Python


A brief set of principles for writing good Python code.

Type in import this into your favorite terminal and get the Python community’s coding philosophy whenever you need it.

The Zen of Python was created by Tim Peters.


💶 Earn Bitcoin by viewing ads at CoinPayU.

  1. Beautiful is better than ugly.
  2. Explicit is better than implicit.
  3. Simple is better than complex.
  4. Complex is better than complicated.
  5. Flat is better than nested.
  6. Sparse is better than dense.
  7. Readability counts.
  8. Special cases aren’t special enough to break the rules.
  9. Although practicality beats purity.
  10. Errors should never pass silently.
  11. Unless explicitly silenced.
  12. In the face of ambiguity, refuse the temptation to guess.
  13. There should be one— and preferably only one —obvious way to do it.
  14. Although that way may not be obvious at first unless you’re Dutch.
  15. Now is better than never.
  16. Although never is often better than right now.
  17. If the implementation is hard to explain, it’s a bad idea.
  18. If the implementation is easy to explain, it may be a good idea.
  19. Namespaces are one honking great idea — let’s do more of those!

🔒 Grab yourself a secure hardware wallet from Trezor.

💓 If you enjoyed the information and the web site, please donate.


Elyse Y. Robinson Elyse Y. Robinson, an enterprising entrepreneur, is the mastermind behind Taxes and Services, a multifaceted holding company that doubles as her accounting firm. Her ventures encompass an array of innovative projects. One of her key initiatives is Switch Into Tech, a dynamic weekly newsletter that doubles as a platform for advertising monthly career seminars, offering weekly tech-related freebies, and promoting her latest podcast episodes of Nobody Wants To Work Tho. Additionally, Elyse shares her insights through her blog at Data.gal, where she delves into various data-related topics. Elyse’s passions extend beyond her businesses; she is deeply enamored with Mexico, has an insatiable appetite for research, and is dedicated to assisting others in transitioning into technology careers.


Subscribe to the Newsletter