PY
Python — Intermediate
Write Python the way professionals do: handle errors cleanly, model data with classes and dataclasses, process files and JSON, use generators for large data, add type hints, call web APIs and test your code with pytest.
Lessons
- 1Errors & Exceptionstry / except / else / finally, raising errors and custom exception classes.
- 2Classes & DataclassesBundle data and behaviour with classes; remove boilerplate with @dataclass.
- 3Files, Paths, CSV & JSONNavigate the file system with pathlib and convert between CSV and JSON.
- 4Regular ExpressionsMatch, validate, extract and replace text patterns with the re module.
- 5Iterators, Generators & ComprehensionsProcess large data lazily with generators, yield and itertools.
- 6Data Analysis with pandasLoad, filter, group, join and summarise tabular data with DataFrames.
- 7Type Hints & mypyAdd types to functions and data, then let mypy find bugs before you run the code.
- 8Calling Web APIsMake HTTP requests, handle errors and timeouts, and work with JSON responses.
- 9Testing with pytestWrite automated tests with plain assert statements, fixtures and parametrize.