Pythonic

Updated: 05/05/2017 by Computer Hope

Python logoPythonic is an adjective that describes an approach to computer programming that agrees with the founding philosophy of the Python programming language. There are many ways to accomplish the same task in Python, but there is usually one preferred way to do it. This preferred way is called "pythonic".

Python philosophy of writing code

  • Beautiful is better than ugly.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Sparse is better than dense.
  • Readability counts.

Tip: For more information, including lots of great examples of properly Pythonic code, check out the Hitchhiker's Guide to Python.

Programming terms, Programming