Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Perfectly Pythonic Python Stuff That You Should Definitely Know

7 min readAug 20, 2020

--

Image from wallpaperflare

Most of us have some go-to functions when we code. Once we are used to coding in a certain way, we tend to use the same functions over and over again, even when there may be a much better way. And, as per the Zen of Python, there should be only one — and preferably only one — obvious way to do it!

More often than I would like to admit, I have fallen in this trap as well. For example getting too used to for loops, using prints too often instead of logs and the list goes on. That is definitely not the Pythonic way to do it. You can always refresh your knowledge about being Pythonic, i.e. writing clear, concise and easy to maintain codes and much more here:

Over a period, the following 7 functionalities became my favorites to use because of their simplicity and an inherent elegance. If you haven’t till now, you should definitely try to use them whenever possible.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Krupesh Raikar
Krupesh Raikar

Written by Krupesh Raikar

In pursuit of convergence between creativity and logic | Storyteller | Traveler | Data Scientist | https://www.linkedin.com/in/krupesh-raikar