try / except (Python)

try/except is how Python handles errors. Code that might fail goes in the try block, and the except block runs instead if an exception occurs, preventing a…