HOW TO: Automatically Format Python Code to PEP8 Style? (+ BONUS Tips):

autopep8: https://github.com/hhatto/autopep8
Autoformat: autopep8 –in-place -a -a file.py

3 Bonus tips for clean code:
• Give meaningful names to variables.
• Make functions that do one thing only.
• Create a skeleton for your code. An essay has an intro, a body, and a conclusion. In code, you have your dependencies, variables and functions, and then execution.

Source: https://www.youtube.com/watch?v=EDUVyMXABoQ

Leave a Reply

Your email address will not be published. Required fields are marked *