Professional · Interview Prep · Software engineering

Python Interviews

Original questions a senior Python panel asks, with visual model answers and a timed mock interview.

  • USD 29
  • Intermediate–Advanced
  • 19h
  • 27 lessons
  • No certificate

Not affiliated with or endorsed by the Python Software Foundation or any employer, and not based on any employer's real interview questions.

What you’ll learn

  • Predict and explain what Python code does from its data model: names and references, mutability, copying, identity, equality and hashing
  • Reason about scope, closures, late binding and decorators, and design clean function signatures
  • Use iterators, generators and itertools to build lazy pipelines, and say what they cost in memory and time
  • Design classes with dunder methods, properties, descriptors, the MRO and super(), and choose between dataclasses, Pydantic models, ABCs and Protocols
  • Type a codebase with generics, Protocols, TypedDict and overloads, and run type checkers in CI
  • Choose between threads, processes and asyncio from the workload, explain the GIL and free-threading, and debug cancellation, blocking calls and races
  • Find and fix slow or memory-hungry Python with profilers, the right data structures, caching and vectorization
  • Test, package and ship Python services and data pipelines (pytest, FastAPI, pandas and Polars, LLM API calls), and solve live coding problems with idiomatic, tested code

Skills you’ll practise

  • Python
  • Python data model
  • Closures
  • Decorators
  • Generators
  • itertools
  • Descriptors
  • Method resolution order
  • dataclasses
  • Pydantic
  • Typing
  • Protocols
  • mypy
  • Exceptions
  • Context managers
  • Threads
  • multiprocessing
  • asyncio
  • Free-threaded Python
  • Profiling
  • Memory management
  • NumPy
  • pandas
  • Polars
  • PyArrow
  • pytest
  • Mocking
  • Hypothesis
  • Packaging
  • uv

About this course

Interview preparation for mid-level and senior engineers interviewing for Python roles in backend, data engineering and AI/ML engineering. No trivia: classics are asked the way a senior panel asks them (predict the output, debug the failure, explain the trade-off) across the data model and references, functions, closures and decorators, iteration and generators, objects and design, typing, errors and context managers, concurrency (the GIL, free-threading and asyncio), performance, testing and packaging, Python for data and AI engineering, and the live coding round. Questions and answers are original, code outputs were run, and Python and library facts are checked against the official documentation.

How you will prepare

  • 27 question sets across 12 units: each question card says what the interviewer is looking for, gives a visual model answer, a weak and a strong answer side by side and the follow-ups to expect
  • Practice questions: multiple choice with an explanation of every option, and written answers scored against a rubric by the AI coach (or by your own self-check against the model answer)
  • A timed mock interview (20 questions in 45 minutes): a random mix from every unit, scored per unit with a list of questions to review. No pass mark; retake it as often as you like
  • A readiness view per unit: questions practised, written-answer scores and your latest mock interview
  • Flashcards for the facts and commands worth memorising, reviewed on a spaced schedule

Interview preparation: there is no certificate, and nothing here promises a hiring outcome.

Independent interview preparation. Not affiliated with or endorsed by the Python Software Foundation or any employer, and not based on any employer's real interview questions. All questions and answers are original; Python and library facts are as of November 2026; numbers are illustrative.

Syllabus

12 units, 27 lessons, about 19 hours.

1Unit 1: How Python Interviews Run5% of the mock interview2 topics1h 10m

How a Python interview loop for backend, data and AI roles usually runs, and the frameworks that keep an answer structured: clarify, plan, code out loud, test as you go. You then practise the behavioural questions a panel uses to judge ownership, judgement and communication.

  • 1.1 The Interview Loop and the Coding-Round Framework
  • 1.2 Behavioural Questions for Python Engineers
2Unit 2: The Data Model: Names, References and Mutability10% of the mock interview2 topics1h 26m

Python's data model as a senior panel probes it: names bound to objects, mutability, aliasing, shallow and deep copies, and the mutable-default trap. You then reason about identity versus equality, hashing and interning with predict-the-output snippets and reference diagrams.

  • 2.1 Names, References, Mutability and Copying
  • 2.2 Identity, Equality, Hashing and Interning
3Unit 3: Functions, Scope, Closures and Decorators9% of the mock interview2 topics1h 22m

Functions as objects: the LEGB rule, closures, late binding in loops, nonlocal and global. You then write and debug decorators with arguments and functools.wraps, and design signatures with keyword-only and positional-only parameters.

  • 3.1 Scope, LEGB, Closures and Late Binding
  • 3.2 Decorators and Function Signatures
4Unit 4: Iteration: Iterators, Generators and itertools8% of the mock interview2 topics1h 25m

The iteration protocol under the hood: iterators, generators, generator state and yield from. You then build lazy pipelines with itertools and explain when lazy beats eager for memory and latency.

  • 4.1 Iterators, Generators and yield from
  • 4.2 Generator Pipelines, itertools and Memory
5Unit 5: Objects and Design10% of the mock interview3 topics2h 1m

Object design in Python: dunder methods, properties and descriptors, and how attribute lookup works. You then untangle multiple inheritance with the MRO and super(), and choose between dataclasses, Pydantic models, ABCs, Protocols and composition.

  • 5.1 Dunder Methods, Properties and Descriptors
  • 5.2 Inheritance, the MRO and super()
  • 5.3 Data Classes, Protocols, ABCs and Composition
6Unit 6: Typing7% of the mock interview2 topics1h 21m

Static typing as teams use it: annotations, generics with the PEP 695 syntax, Protocols and variance. You then type real APIs with TypedDict, overloads and Literal, and run type checkers in CI without confusing static and runtime checks.

  • 6.1 Annotations, Generics and Protocols
  • 6.2 TypedDict, Overloads, Literal and Type Checkers in CI
7Unit 7: Errors, Context Managers and Resources7% of the mock interview2 topics1h 27m

Errors as part of the design: exception hierarchies, chaining, exception groups and except*. You then manage resources with with-statements and contextlib, and build retries with backoff that do not hide failures.

  • 7.1 Exception Design and Exception Groups
  • 7.2 Context Managers, Cleanup and Retries
8Unit 8: Concurrency: Threads, Processes and asyncio11% of the mock interview3 topics2h 12m

Concurrency from the workload: threads, processes and asyncio, the GIL and the free-threaded build. You then read event-loop timelines, use TaskGroup and cancellation correctly, and find races and blocking calls in async code.

  • 8.1 Threads, Processes, the GIL and Free-Threading
  • 8.2 asyncio: the Event Loop, Tasks, TaskGroup and Cancellation
  • 8.3 Race Conditions, concurrent.futures and Mixing Sync with Async
9Unit 9: Performance and Internals8% of the mock interview2 topics1h 20m

Performance from evidence: the cost of built-in operations, profiling with cProfile and sampling profilers, and reading a profile. You then cover memory, reference counting and the garbage collector, caching and vectorization with NumPy, pandas and Polars.

  • 9.1 Complexity of Built-ins and Profiling
  • 9.2 Memory, Garbage Collection, Caching and Vectorization
10Unit 10: Testing and Tooling7% of the mock interview2 topics1h 17m

Testing that catches real bugs: pytest fixtures and parametrize, mocking where a name is looked up, and property-based tests. You then package and ship code with pyproject.toml, uv, lockfiles, wheels and ruff.

  • 10.1 pytest: Fixtures, Parametrize, Mocking and Property-Based Tests
  • 10.2 Packaging, Environments and Tooling
11Unit 11: Python for Data and AI Engineering9% of the mock interview3 topics1h 59m

Python in data and AI work: pandas and Polars idioms and pitfalls, Arrow and large files. You then design FastAPI services with Pydantic validation and call LLM APIs robustly with timeouts, retries, streaming and validated structured output.

  • 11.1 pandas and Polars: Idioms, Pitfalls and Large Data
  • 11.2 FastAPI Service Design and Pydantic Validation
  • 11.3 Calling LLM APIs Robustly
12Unit 12: The Coding Round9% of the mock interview2 topics1h 22m

The live coding round: idiomatic solutions with complexity for an LRU cache, top-k, interval merging and sliding windows. You then build systems-flavoured code (a rate limiter, a retry decorator, a log stream parser), each with a walkthrough and tests.

  • 12.1 Data-Structure Problems: LRU Cache, Top-k, Intervals and Sliding Windows
  • 12.2 Systems Problems: Rate Limiter, Retry Decorator and Log-Stream Parser

Who it’s for

Working professionals, at Intermediate–Advanced level.

Time needed

Self-paced, with no start dates or deadlines. Working through everything takes about 19 hours in total; the syllabus shows the time for each unit.

Course authors

iLearnRight software engineering team

Written by practising Python engineers (backend, data and AI engineering) for engineers preparing for Python interviews. Every question and model answer is original; Python and library facts were checked against the official documentation on the dates in the sources list and are as of November 2026, and every predict-the-output snippet was run. Numbers in examples are illustrative. iLearnRight is independent and not affiliated with the Python Software Foundation.

Questions

Is this course self-paced?

Yes. There are no start dates or deadlines: open the next lesson whenever you have time. Working through everything takes about 19 hours.

What is included?

27 lessons, 270 practice questions with every answer choice explained, 181 flashcards reviewed on a spaced schedule. An AI coach can give hints when you are stuck. Audio versions of the lessons are not available for this course yet.

Does this course give a certificate?

No. It is interview preparation: it tracks how ready you are in each area, and its mock interview is practice, so there is no certificate.

Does this course prepare me for an external exam?

No. There is no external exam: the units, their weights and the final assessment are this course's own, and all questions are written for this course.

More like this

Related courses

All Interview Prep courses
Interview Prep

Professional · Data engineering

Databricks Data Engineer Interviews

Prepare for data engineering interviews at Databricks-heavy teams: about 200 original questions a hiring panel asks mid-level and senior engineers, from Spark execution and skew to Delta Lake MERGE, streaming state, Unity Catalog, cost and on-call scenarios, system design, live coding, and serving data through metric views, Genie and data APIs. Every model answer leads with a picture (a plan, a Delta log, a watermark timeline, a cost breakdown) and shows a weak answer next to a strong one, with the follow-ups to expect. Practise with rubric-scored open answers and a timed mock interview.

  • Intermediate–Advanced
  • 21h
  • 32 lessons
  • Interview prep
  • Lessons
  • Flashcards
  • Practice
  • AI coach

Not affiliated with or endorsed by Databricks, and not based on any employer's real interview questions.

USD 29No certificate

Free with a group code. Online payment is coming soon; until then, request access.

Interview Prep

Professional · AI engineering

AI, LLM & ML Engineer Interviews

Prepare for ML engineer, AI/LLM engineer and applied scientist interviews: about 225 original questions asked the way senior panels ask them (derive it, debug it, choose with trade-offs, design under constraints), from bias and variance, metrics and gradient boosting to attention, the KV cache, LoRA and preference tuning, RAG, agents, evaluation, LLMOps, ML system design and responsible AI. Every model answer leads with a picture (an architecture, a loss curve, a ROC curve, a RAG flow, worked memory and cost numbers) and shows a weak answer next to a strong one, with the follow-ups to expect.…

  • Intermediate–Advanced
  • 23h
  • 35 lessons
  • Interview prep
  • Lessons
  • Flashcards
  • Practice
  • AI coach

Not affiliated with or endorsed by any employer, AI lab or vendor named in the course, and not based on any employer's real interview questions.

USD 29No certificate

Free with a group code. Online payment is coming soon; until then, request access.

Data and cloud

Professional · Data engineering

Databricks Data Engineer

Build and run data pipelines on the Databricks platform: ingestion, transformation with PySpark and SQL, Lakeflow Jobs, CI/CD with bundles, troubleshooting, and Unity Catalog governance. Prepares you for the Databricks Certified Data Engineer Associate exam.

  • Associate
  • 15h
  • 30 lessons
  • Lessons
  • Flashcards
  • Practice
  • Timed assessments
  • AI coach

This course is not affiliated with, sponsored by or endorsed by Databricks, Inc.

USD 29Certificate

Free with a group code. Online payment is coming soon; until then, request access.