How to be Pythonic and why you should care
https://towardsdatascience.com/how-to-be-pythonic-and-why-you-should-care-188d63a5037e
Robert ClarkBlockedUnblockFollowFollowingApr 14Token photo of a Python for an article about [the other kind of] Python. Photo by Tyler B on UnsplashA snake is a snake and that’s thatI’ve officially been writing code for over a dozen years now with the last 5 as a full-time software engineer, and while I still have MUCH to learn (a lifetime of learning to be exact!), I have seen my fair share of software and have (dare I say) developed my skills immensely in the field during that time. I still remember some of the first programs I ever wrote, and cringe in bed at night as I relive the nightmares of my days as a beginner programmer. While I will never escape the crimes of my past (writing quintuple-nested loops is the biggest of those sins), perhaps I can partially redeem myself, even if only slightly, by helping other developers who are fresh into the field learn a few best practices to write faster, cleaner, and better code.
As with nearly every programming language, there are certain stylistic and conventional guidelines that are accepted by the Python community to promote unified, maintainable, and concise applications that are written the way the language intended them to be written. These guidelines range from proper variable, class, and module naming conventions, to looping structures, and even the proper way to wrap lines of code. The name “Pythonic” was coined to describe any program, function, or block of code that follows these guidelines and takes advantage of Python’s unique capabilities.