INTERMEDIATE-PYTHON COURSE GUIDE

Intermediate Python Programming Course

A chapter-by-chapter readback of the free course by Patrick Loeber (python-engineer) on freeCodeCamp.org.

Length5:55:46
Chapters28
Modules6
Plain Markdown with clickable timestamps — drops into Obsidian, Notion or GitHub as-is.

One course walks through 21 distinct intermediate topics in order, from smarter use of built-in collections up to concurrency, decorators, and generators — each with runnable code.

Who it's for
Read this guide if
  • You know basic Python syntax and want the next level
  • You want to finally understand decorators, generators, or the GIL
  • You're unsure when to use threads vs processes
Skip ahead if
  • You've never written any Python before
  • You only want advanced data science or ML content
  • You need a project-based course rather than concept walkthroughs
In brief
  • Duration: about 5 hours 56 minutes (21,346 seconds).
  • 21 sections, grouped here into 6 modules.
  • Tools: Python 3, standard library (collections, itertools, logging, json, random, secrets, functools, multiprocessing), NumPy.
  • Level: intermediate; assumes basic Python knowledge.
  • Free companion code repository on GitHub.

The walkthrough

Each chapter below is our original written explanation of what happens at that moment in the video — a paraphrase, not a transcript. Click any timestamp to jump the player.

Collections Deep Dive

0:00

Introduction & Lists

Course overview for learners with basic Python knowledge, then a tour of lists: creation, indexing (including negative indices), iteration, and mutation methods like append, insert, pop, remove, sort, and the in-place vs sorted() distinction.

10:03

List Slicing & Copying

Slicing syntax with optional start, stop, and step values (negative step reverses a list), plus why assignment doesn't copy and three ways to make a real copy.

15:01

List Comprehensions & Tuples

One-line list comprehensions, then tuples: creation, the single-element trailing comma, immutability, indexing, and basic operations.

20:12

Tuple Operations & Unpacking

Tuple methods (count, index), conversion to and from lists, slicing, unpacking into variables including the star syntax, and why tuples are smaller and faster than lists.

29:52

Dictionaries

Dictionary creation with braces or dict(), access and KeyError behavior, mutation and deletion methods, looping, copying, and merging with update().

40:06

Dictionary Keys & Sets

Which types can be keys (immutable ones only), then sets: automatic deduplication, mutation methods, and set operations like union, intersection, difference, and symmetric difference.

50:28

Set Updates, Comparisons & Frozensets

In-place update methods, subset/superset/disjoint checks, proper copying, and the immutable frozenset.

59:27

Strings

Strings as ordered immutable sequences: quoting and escaping, indexing and slicing, concatenation, iteration, and common methods like strip, upper, find, count, and replace.

1:07:20

Split, Join & String Formatting

split() and join() for string-list conversion, a timeit demonstration showing why join beats += concatenation, and the three formatting styles: %-style, .format(), and f-strings.

Standard Library Power Tools

1:22:53

Collections Module

Five special containers: Counter with most_common, lightweight namedtuple, OrderedDict, defaultdict with type-based defaults, and deque for fast operations on both ends.

1:30:06

itertools

Iterator tools: product, permutations, combinations (with and without replacement), accumulate with custom functions, groupby with key functions, and infinite iterators count, cycle, and repeat.

1:32:14

Lambdas & Functional Tools

Anonymous one-line functions, then their main use as key or transformation arguments in sorted, map, filter, and functools.reduce.

2:04:06

Exceptions

Syntax errors vs exceptions, common built-in exception types, raising with raise and assert, try/except/else/finally handling, and defining custom exception classes.

2:13:33

Logging

Log levels and basicConfig options, per-module loggers with propagation, handlers and formatters, config files, stack-trace capture, and rotating file handlers.

Serialization and deserialization with json.dumps/loads and their file variants, plus custom encoders and decoders for your own classes.

2:59:45

Random Numbers

The random module for pseudo-random numbers (with seeding for reproducibility), the secrets module for security-sensitive randomness, and NumPy random arrays with their own seed.

Decorators

3:14:26

Function Decorators

Functions as first-class objects, building a decorator with an inner wrapper function, handling arbitrary arguments with *args/**kwargs, returning results, and preserving identity with functools.wraps.

3:22:32

Advanced Decorators

A reusable decorator template, decorators that take arguments via nested functions, stacked decorators and their execution order, and class-based decorators using __call__ with typical use cases.

Generators

3:28:55

Generators & yield

Defining generators with yield, stepping through them with next() and StopIteration, and a countdown example showing how generators remember state between calls.

3:35:56

Generator Efficiency & Expressions

Memory comparisons showing generators beat full lists for large data, a Fibonacci generator, and generator expressions written like list comprehensions but with parentheses.

Threading & Multiprocessing

3:45:12

Processes vs Threads & the GIL

Definitions, trade-offs, and ideal use cases for processes versus threads, plus what the GIL is, why CPython needs it, and known workarounds.

4:02:50

Threads, Locks & Queues

Creating and joining threads, a race condition demo on shared data fixed with a Lock (preferably as a context manager), queue-based worker threads, and daemon threads.

4:23:28

Multiprocessing

Sharing data between processes with Value, Array, locks, and process-safe queues, then the Pool API with map and apply for parallel work across CPU cores.

Functions, Copies & Context Managers

4:53:29

Function Arguments

Parameters vs arguments, positional and keyword arguments, defaults, *args/**kwargs, keyword-only parameters, and unpacking lists and dicts into calls.

5:14:08

Scoping & Call by Object Reference

Global variables in functions, how Python passes object references, why mutables can be modified but not rebound inside functions, and the subtle difference between += and = ... +.

5:24:47

The Asterisk Operator

All uses of *: multiplication and power, repeated containers, *args/**kwargs, keyword-only parameters, unpacking, and merging containers.

5:30:30

Shallow vs Deep Copies

Why assignment isn't copying, shallow copies with copy.copy, list(), and slicing, where they fail with nested structures, and when copy.deepcopy is required.

5:40:10

Context Managers

Resource management with the with statement, implementing __enter__/__exit__ on a class including exception handling, and a generator-based alternative using contextlib.contextmanager.

Moment by moment

TimeWhy it matters
15:13List comprehension introduced — the first 'lesser-known' trick that changes everyday code
1:23:13collections module begins: Counter, namedtuple, defaultdict, deque
3:14:26Decorators explained from first principles with a reusable template
3:45:12Processes vs threads and the GIL — the conceptual heart of the concurrency section
4:53:29Function arguments deep dive: *args, **kwargs, and keyword-only parameters

Do this next

  1. Clone the companion GitHub repo and re-implement each section's examples yourself.
  2. Write your own repeat decorator with arguments and verify stacked decorator ordering.
  3. Reproduce the shared-counter race condition with threads, then fix it with a Lock and confirm the correct result.

Common questions

What Python level do I need for this course?

Basic Python knowledge — the course reviews lists, strings, and dictionaries briefly before moving into advanced topics.

How long is the course?

About 5 hours 56 minutes (21,346 seconds), split into 21 sections.

Is the code available?

Yes — a companion repository is linked in the video description (github.com/python-engineer).

Does threading make CPU-bound Python code faster?

No. Due to the GIL only one thread executes at a time; the course recommends multiprocessing for CPU-bound work and threads for I/O-bound tasks.

Spot a mistake?

Every chapter summary is hand-checked against the video transcript, but errors can slip through. If you spot a wrong timestamp, a misleading summary, or a missing topic, email us and we'll fix it.

More course guides