Now let's look at another tenet of Python philosophy and culture, the idea that "It's Easier to Ask for Forgiveness than for Permission".
There are only two approaches to dealing with a program operation that might fail. The first approach is to check that all the preconditions for a failure prone operation are met in advance of attempting the operation. The second approach is to blindly hope for the best, but be prepared to deal with the consequences if it doesn't work out.
In Python culture these two philosophies are known as Look Before you Leap (LBYL) and its Easier to Ask for Forgiveness than for Permission (EAFP) – which, incidentally, was coined by Rear Admiral Grace Hopper, inventor of the compiler.
Python is strongly in favor of EAFP because it puts primary logic for the "happy path" &...