Python in depth: the rest of the language

Go beyond the basics, with real programs and real interviews in mind.

⏰ 8 weeks🎯 Standard🧩 Capstone🖥 Any device · our GPUs
Generated from this course

🎯 About this course

You have written small programs. This course teaches the rest of the language through one story: a tea stall that has grown into two counters and an online shop. You will write hundreds of short exercises, build a tested ordering core, learn what runs your Python and how to size and watch it, and practise the questions people really ask in interviews, with model answers and timed problems.

By the end you will be able to

  • Explain how Python finds names and write functions with flexible arguments, closures and lambda.
  • Write recursive functions for nested data.
  • Clean text with regular expressions and choose the right container for each job.
  • Analyse the cost of a search and process large data lazily with generators.
  • Design classes with properties, inheritance, special methods and abstract contracts.
  • Build decorators and context managers that wrap functions and guard resources.
  • Use custom exceptions to handle errors, and state a function's contract with type hints and docstrings.
  • Analyse work that overlaps, and build small tested projects from separate rules.
Curriculum

Topics covered

Functions in depth 5 topics

  • Entry check: are you ready for the depth?
    A forty-minute check of the skills this course builds on, with a pointer to the Python from zero topic to revisit for each one.
  • Names and scope
    Where names live (LEGB), reading and changing globals, hiding built-ins by accident, keywords and pass.
  • Flexible functions: *args and **kwargs
    Positional and named arguments, defaults, collecting with args and kwargs, unpacking in a call, keyword-only parameters and the mutable-default trap.
  • Functions as values: closures, lambda, map, filter, reduce
    Functions stored, passed and returned; closures and nonlocal; lambda; map, filter and reduce; functools.partial.
  • Recursion
    Functions that call themselves: base case and smaller case, the call stack, recursion on lists and on nested data, and when a loop is better.

Data in depth 4 topics

  • Text and regular expressions
    Tidying text, formatting numbers with format specs, and finding and changing patterns with regular expressions and groups.
  • The right container: defaultdict, deque, heapq, namedtuple, array
    Choosing the right container: defaultdict for grouping, Counter for ranking, deque for queues and windows, heapq for the smallest or largest, namedtuple for records and…
  • Iterators and generators
    How for loops work (iter and next), generators with yield, laziness and memory, generator expressions, one-use iterators and the itertools tools islice, chain and count.
  • Speed and choice: complexity, bisect, caching
    How the work grows with the data (constant, linear, quadratic), why sets and dictionaries are fast, binary search and bisect, and caching with lrucache.

Objects in depth 4 topics

  • Classes properly: class methods, properties, encapsulation
    Class and instance attributes, class and static methods, properties with validation, the underscore conventions and repr.
  • Inheritance and polymorphism
    Child classes, super(), overriding, polymorphism, duck typing, isinstance, and when to inherit.
  • Contracts and special methods: abstraction, dunder methods, dataclasses
    Special methods that make objects work with Python's operators and built-ins, abstract base classes as contracts, and dataclasses for record-like classes.
  • Decorators and context managers
    Decorators that wrap functions, functools.wraps, decorators with settings, context managers with with, enter and exit, and contextlib.contextmanager.

Robust programs 4 topics

  • Exceptions in depth
    try, except, else and finally; the exception family tree; raising your own exceptions; chaining with raise from; EAFP; and keeping a loop running after one bad item.
  • Type hints and clear contracts
    Type hints for parameters, results, collections and optional values; static checkers; docstrings as written contracts; and reading hints at run time.
  • Doing many things at once: threads, processes, asyncio
    I/O-bound and CPU-bound work, threads, processes and asyncio, the GIL, race conditions, locks and deadlocks, and reasoning about workers with numbers.
  • Projects studio: four mini-projects
    Four small projects built from testable rules: rock-paper-scissors, number guessing, tic-tac-toe and a bank account, with a method for planning, testing and reviewing.

Infrastructure behind your Python 4 topics

  • The infrastructure map: what runs your Python
    The parts that run your Python: file, interpreter and bytecode, the call stack, memory manager, standard library, process and cores, with a card for each and the path of…
  • Memory, speed and the call stack
    Estimating memory, finding the bottleneck with a profiler, caches that must be bounded, recursion depth as arithmetic, and failure drills.
  • Concurrency: resources and failure
    Workers, queues, locks and the scheduler as resources; sizing workers with arithmetic, the queue as an early warning, failure drills, and security and data handling.
  • Running and watching Python programs
    Logging with levels, exit codes, configuration and secrets, versions and dependencies, monitoring and alerts, a one-page runbook and a handover note.

Interview ready 3 topics

  • Interview ready: functions, data and speed
    The questions people really ask about functions, data structures and speed, with model answers, timed problems and a mock round.
  • Interview ready: objects and robust code
    The questions people really ask about classes, inheritance, decorators, context managers, exceptions and type hints, with model answers, design problems and a mock round.
  • Interview ready: performance, concurrency and design
    The questions people really ask about speed, concurrency and running programs, with model answers, design problems with numbers, and a mock estimation round.
Course at a glance

See how this course is built

Where the time goes

Longer spokes mean more hours on that module.

Course roadmap click a step

Try a lesson0 / 3

Sample questions from this course. Your progress is kept only in your browser.

Week by week

Drag the slider, or press play, to walk through the course and see what you will have built by each week.

Week 1 of 8
Wk 1

Names and flexible functions

The entry check and scenes 1 and 2: scope, *args and **kwargs.

Wk 2

Functions as values and recursion

Scenes 3 and 4: closures, lambda, map, filter, reduce, and recursion.

Wk 3

Data in depth

Scenes 5 to 8: regular expressions, containers, generators, speed and caching.

Wk 4

Objects in depth

Scenes 9 to 12: classes, inheritance, special methods, decorators and context managers.

Wk 5

Robust programs

Scenes 13 to 16: exceptions, type hints, concurrency and four projects.

Wk 6

What runs your Python

Scenes 17 and 18: the parts, memory and speed.

Wk 7

Running it well

Scenes 19 and 20: concurrency as a resource, logging and alerts.

Wk 8

Interview ready

Scenes 21 to 23: model answers, timed problems and mock rounds; present the capstone.

What you'll build

The ordering core

A tested Python package for Chai Corner's ordering backend: classes, a discount contract, a cache, JSON in and out, custom exceptions and logging.

Infrastructure and interview sheet

Seven component cards for your own program, a worker sizing for a stated load, one failure drill, and a recorded self-review of one interview answer.

Why take this course

  • Learn the parts of Python that real programs rely on
  • Write code on every page, with hints and checks
  • Prepare for interviews as part of the course

You will build

  • A tested ordering core with a discount contract and a cache
  • Decorators and context managers
  • A worker sizing and a runbook for your own program

What you can do afterwards

  • Design classes, functions and data flows that stay clear as programs grow
  • Explain what runs your Python and how to size and watch it
  • Answer common interview questions and solve timed problems aloud
How to take it

💳 Delivery & fees

One course, four ways to attend. Fees are per course, in rupees excluding 18% GST (the GST-inclusive amount is shown too).Fees are per course, in Canadian dollars, before applicable GST/HST.Fees are per course, in US dollars, before any applicable local taxes. Bulk and institutional volume pricing is available.

Self-paced

₹2,95,500

+ 18% GST · ₹3,48,690 all-in

Programme ₹2,57,000 + infrastructure & GPU labs ₹38,500

≈ ₹36,938 per week ex-GST over 8 weeks

CA$14,300

per course, before applicable GST/HST

Includes our GPU lab infrastructure: no cloud credits to buy

≈ CA$1,788 per week over 8 weeks

US$10,300

per course, before any applicable local taxes

Includes our GPU lab infrastructure: no cloud credits to buy

≈ US$1,288 per week over 8 weeks

  • Full recorded library
  • Browser GPU lab
  • All project briefs
  • Mentor review add-on
Most popular

Live online

₹3,54,500

+ 18% GST · ₹4,18,310 all-in

Programme ₹3,08,300 + infrastructure & GPU labs ₹46,200

≈ ₹44,313 per week ex-GST over 8 weeks

CA$17,150

per course, before applicable GST/HST

Includes our GPU lab infrastructure: no cloud credits to buy

≈ CA$2,144 per week over 8 weeks

US$12,350

per course, before any applicable local taxes

Includes our GPU lab infrastructure: no cloud credits to buy

≈ US$1,544 per week over 8 weeks

  • Everything in self-paced
  • Scheduled live classes
  • 1:8 mentor code review
  • Cohort + capstone review

Hybrid — weekend

₹3,84,000

+ 18% GST · ₹4,53,120 all-in

Programme ₹3,33,900 + infrastructure & GPU labs ₹50,100

≈ ₹48,000 per week ex-GST over 8 weeks

CA$18,600

per course, before applicable GST/HST

Includes our GPU lab infrastructure: no cloud credits to buy

≈ CA$2,325 per week over 8 weeks

US$13,400

per course, before any applicable local taxes

Includes our GPU lab infrastructure: no cloud credits to buy

≈ US$1,675 per week over 8 weeks

  • Recorded weekday lessons
  • Live weekend sessions
  • Full mentor review
  • Cohort + capstone

Live in-person

₹4,28,500

+ 18% GST · ₹5,05,630 all-in

Programme ₹3,72,600 + infrastructure & GPU labs ₹55,900

≈ ₹53,563 per week ex-GST over 8 weeks

CA$20,750

per course, before applicable GST/HST

Includes our GPU lab infrastructure: no cloud credits to buy

≈ CA$2,594 per week over 8 weeks

US$14,950

per course, before any applicable local taxes

Includes our GPU lab infrastructure: no cloud credits to buy

≈ US$1,869 per week over 8 weeks

  • Everything in live online
  • Classroom instruction
  • On-site mentor time
  • In-person study group

Bulk and institutional pricing. Volume discounts are available for institutions, campuses, companies and groups enrolling several learners. Ask for a group quote →

Your fee includes our GPU lab infrastructure — no cloud credits to buy. See how we compare, with sources →

Ready when you are

Apply for this course

Tell us the format you prefer and we'll confirm the next cohort date and your fee on a short call.

Apply for this course