Course description

You've finished a beginners' Python course and can write a script with lists, loops and functions. This course takes you to the next stage: writing code that is clearer, sturdier and easier to grow. You'll write better functions, use comprehensions and generators, work with files and errors properly, split programs into modules and packages, model data with classes, and check your own code.

There are 11 sections and 55 written lessons. You follow Leyla, a fictional rota planner in Crewe who runs a book group, as she turns a handful of small scripts into a proper reading-list tracker. Every lesson has code you can copy with the exact output it gives, a short exercise and answers to common questions. Each section has a practice pack with starter files to complete, solutions, the fictional book data the lessons use, what each solution prints and a key points PDF.


What you'll learn

  • Getting ready: setting up your course folder, a refresher in one program, how names and objects really work, truthiness, None and handy built-ins such as zip, enumerate and sorted with a key.
  • Functions in depth: defaults and the mutable default trap, *args and **kwargs, keyword-only parameters, good return values, scope and nonlocal, and passing functions around with lambda.
  • Readable code: docstrings and help(), type hints for everyday values and collections, PEP 8 in plain terms, and refactoring a long script into small functions.
  • Comprehensions and generators: list, dictionary and set comprehensions, when a plain loop is clearer, generator expressions and generator functions with yield.
  • Working with files: pathlib in depth, encodings and text files, the csv module properly, JSON for program data, and saving files safely.
  • Handling errors well: reading tracebacks, try, except, else and finally, raising and chaining exceptions, your own exception classes and context managers.
  • Modules and packages: how import works, if __name__ == '__main__', packages and relative imports, organising a small project, and venv and pip in outline.
  • Classes and objects: your first class, methods, state and properties, special methods such as __repr__ and __eq__, dataclasses, inheritance and composition.
  • Iterators and the standard library: how iteration works, collections, itertools, datetime, functools and finding your way round the docs.
  • Debugging and checking your code: a step-by-step debugging method, the IDLE debugger and breakpoint(), assert, and check functions that prove your code works.
  • Final project: a reading-list tracker for the terminal, built as a package with dataclass models, JSON storage, CSV import, reports, a menu and its own checks.


Who it's for

Anyone who knows the basics of Python (variables, lists, dictionaries, loops, if and simple functions) and wants to write larger, tidier programs with confidence. Lesson 1.3 gives a short refresher before the course moves on.


What this course is, and isn't

This is a practical, written course about the core language and its standard library, using Python 3.12 or newer from python.org with IDLE or a terminal, on Windows or a Mac. Nothing else needs installing. It doesn't cover web frameworks, data analysis libraries or notebooks; it gives you the solid foundations those all rely on.

What will I learn?

  • Write flexible, well-documented functions with default and keyword arguments, *args and **kwargs, clear return values and type hints
  • Use list, dictionary and set comprehensions and generators to build and process collections clearly and efficiently
  • Read and write text, CSV and JSON files with pathlib, the csv and json modules, and save data safely
  • Handle errors well: catch specific exceptions, use else and finally, raise your own exceptions and write context managers
  • Organise code into modules and packages, use if __name__ == '__main__', and understand pip and virtual environments in outline
  • Model your data with classes and dataclasses, special methods, properties, inheritance and composition
  • Make good use of the standard library, including collections, itertools, datetime and functools
  • Write readable code in PEP 8 style, refactor long scripts into small functions, and debug problems step by step
  • Check your code with assert and check functions, and build a complete command-line reading-list tracker

Requirements

  • You should have finished a beginners’ Python course, or know the basics: variables, lists, dictionaries, loops, if and simple functions
  • You should be able to write and run a short Python program in IDLE or a terminal; lesson 1.3 gives a quick refresher
  • A Windows PC or Mac with Python 3.12 or newer from python.org; everything in the course uses only the standard library, so there is nothing else to install

Frequently asked questions

It's for people who've finished a beginners' Python course and want to write larger, tidier programs. It starts with a short refresher, then goes deeper into functions, files, errors, modules, classes and the standard library.

The beginners' course teaches the building blocks. This course shows how to use them well: functions in depth, comprehensions and generators, proper error handling, packages, classes and dataclasses, debugging and checking your code, ending with a multi-module project.

Python 3.12 or newer, from python.org. Lesson 1.2 shows how to check which version you have.

No. Every lesson and practice file uses only the standard library that comes with Python. Lesson 7.5 explains pip and virtual environments in outline, so you know how they work when you need them.

Yes. Every section has a practice pack with starter files to complete, solutions, the fictional reading-list data the lessons use, what each solution prints and a key points PDF. Section 11's pack holds the whole final project.

No. Every lesson is written, with code you can copy, the exact output it gives and a short exercise, so you can work at your own pace.

You get lifetime access, including any lessons we add later.

Yes. You can ask for a refund within 14 days of buying if you've completed less than 30% of the course. Email support@rootlet.co.uk.
Intermediate Python: Functions, Classes, Modules and Better Code

£34.99

Lectures

66

Skill level

Intermediate

Expiry period

Lifetime

Certificate

Yes

✓ 14-day money-back guarantee if you have completed less than 30% of the course. Refund policy

✓ Secure card payment by Stripe

✓ Questions before you buy? support@rootlet.co.uk

Sold by Rootlet Academy Ltd, a UK company (no. 17529179).

Share this course

Related courses

Learn something new every week

One short, practical tip each Thursday, plus news when new courses open. Free, and you can unsubscribe in one click.

We'll never share your email. See our privacy policy.