Code golfing is an interesting heuristic dedicated to minimizing the overall length of code to produce the same functionality. The result doesn’t have to be incomprehensible, and in fact, we can make the code more Pythonic in the process!
Concise code helps future readers of the code understand the intent without getting distracted by implementation errata. We’ll cover numerous features of Python which allow complex ideas to be expressed concisely without sacrificing readability.
- Why even bother?
- Default! The two sweetest words in the english language!
- The Joy of Tuples
- Comprehending Comprehensions
- Who’s afraid of Functional Programming?
- Ideas in Context Managers