Python: Programming, Automation and Data Analysis
Exit

Lesson 7 of 14 · Structuring your code

Files and exceptions: with, try/except/finally, raising your own exceptions

1 h 5 min Python 3.12 (Debian, git, pip)

Objective

Write programs that do not crash at the first surprise: read and write files properly, react to invalid input, a missing file or insufficient stock, and clearly report the errors of your own code.

This lesson is part of the full course

Unlock Python: Programming, Automation and Data Analysis to read every lesson, do the exercises, access the simulations and earn your certificate.

Already enrolled? Log in.