If you type `import this` in a Python REPL, you will be presented with the Zen of Python, a document with some guidelines that you can follow when writing code.
In Python, we have `try: ... except: ...` blocks, and it is often considered idiomatic Python code to use them (EAFP) instead of using pre-emptive checks with `if` statements (LBYL).
If you found value, consider following me (@mathsppblog) and retweet the beginning of the thread to make sure everyone gets a fair chance at writing their best Python π code yet!