In this quiz, you’ll test your understanding of LBYL vs EAFP: Preventing or Handling Errors in Python.
By working through this quiz, you’ll revisit the look before you leap (LBYL) and easier to ask forgiveness than permission (EAFP) coding styles. You’ll also practice spotting hidden check repetition, race conditions, and common gotchas, and decide which style fits a given situation.
[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

