In Python, Don’t Look Before You Leap

Advice for cleaner and better Python code

Kamran Ahmad
Better Programming
Published in
4 min readFeb 16, 2021

--

Man leaping into the ocean
Photo by Cris Tagupa on Unsplash.

In this article, we’ll be taking a look at two common coding styles that programmers use to handle scenarios where a piece of code might fail: “Look Before You Leap” (LBYL) and “Easier To Ask for Forgiveness Than Permission” (EAFP).

--

--