Just because code works once doesn’t mean that it’s always going to work. Being able to write code that doesn’t crash or behave unexpectedly when things go wrong is a really useful skill.

This tutorial guides you through how to use exception handling to control how your programs behave when things go wrong in order to avoid crashes and data loss.

Make your code cope when things go wrong
Error handling in python: Make your code cope when things go wrong

Contents:

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.