Skip to main content

Lessons and exercises

Where Python stops being an exercise and starts touching real data. The unit adds a new category of failure: the input may be missing, malformed, or unavailable, and correct code has to survive that.

Lesson 5.2

Structured Formats

CSV and JSON carry structure that plain text does not. Parsing with the right module avoids hand-splitting that breaks on quoted fields.

Lesson 5.3

Consuming APIs

An API returns structured data over the network, and both the request and the response can fail independently of your code being correct.

Lesson 5.4

Error Handling and Automation

Exception handling separates the expected path from the recovery path. Catching everything hides the bugs you needed to see.

Need help with this topic?

Work through questions with a tutor and get help with the steps you find difficult.

Get help with this topic