Code formatting
Is clean code only about formatting and structuring the code? The short answer is no.
There are some coding standards like PEP-8 (https://www.python.org/dev/peps/pep-0008/) that state how the code should be written and formatted. In Python, PEP-8 is the most well-known standard, and that document provides guidelines on how we should write our programs, in terms of spacing, naming convention, line length, and more.
However, clean code is something else that goes far beyond coding standards, formatting, linting tools, and other checks regarding the layout of the code. Clean code is about achieving quality software and building a system that is robust and maintainable. A piece of code or an entire software component can be 100% compliant with PEP-8 (or any other guideline) and still not satisfy these requirements.
Even though formatting is not our main goal, not paying attention to the code structure has some perils. For this reason, we will first analyze...