Hey all! Thanks to Python’s beautiful simplicity, it offers multiple ways to do the same task. It is also a very intuitive and easy language to read and write. That said, it is easy to get carried away with Python and make things appear more complex than they need to be. PEP8, the python style guide provides some guidelines to stay clean on python. Here is a quick list of 10 that you can immediately start doing in your code.

  1. Do your co-developer a favor and use docstrings
    Use “““Triple double quotes””” to write docstrings that clearly explain the purpose of your function, module and the script in all, even if you are commenting it otherwise. Remember to end your docstrings with a period.

#machine-learning #python #coding #clean-code #data-science

10 Quick Clean Coding Hacks in Python
3.25 GEEK