fromPythonmorsels
3 hours agoEmbrace whitespace
Your code is easiest to read just after you've written it. Your future self will find your code far less readable days, weeks, or months after you've written it. When it comes to code readability, whitespace is your friend. Whitespace around operators Compare this: To this: I find that second one more readable because the operations we're performing are more obvious (as is the order of operations). Too much whitespace can hurt readability though: This seems like a step backward because we've lost those three groups we had before. With both typography and visual design, more whitespace isn't always better.
Python


















