27 November 2026 · 2 min read
Python interview preparation for developers and data engineers
Python interviews split into language depth, framework knowledge and data-pipeline design. Here's what each round covers and how to prepare for the one you're facing.
"Python developer" covers very different jobs — web backends, automation, data engineering, ML. Before you prepare, find out which one you are interviewing for, because the rounds differ a lot. What stays constant is that interviewers want to see idiomatic Python and clear reasoning, not just working code.
Language depth: write Python like a Python developer
- Explain mutable vs immutable types and how they behave as function arguments and dictionary keys.
- What are generators and when do they save memory over a list?
- How do decorators work, and can you write one (for timing or caching)?
- List vs dict vs set — and the time complexity of common operations.
- What does the GIL mean for CPU-bound vs IO-bound work, and how do you work around it (multiprocessing, async, native extensions)?
If you are interviewing for web (Django / FastAPI)
- Request lifecycle, middleware, and how the ORM generates queries.
- How you design and version a REST API, handle validation, and manage database migrations.
- Why FastAPI's async model matters and when it actually helps.
If you are interviewing for data engineering
This is a fast-growing track, and the questions are practical:
- Design an ETL/ELT pipeline for a given source and destination — how do you handle incremental loads, schema changes and failures?
- Pandas questions: how would you clean and join these messy datasets, and what breaks at scale?
- Batch vs streaming, and where tools like Airflow, Spark or Kafka fit.
- Strong SQL — data roles always test it, so don't neglect it.
The live coding problem
Expect a medium problem: parse and aggregate some data, dedupe records, or transform one structure into another. Talk through your approach first, state the complexity, handle edge cases (empty input, duplicates, bad data), then write it. Clean, readable Python with good names scores higher than a clever one-liner nobody can follow.
How to prepare
- Rehearse explaining generators, decorators and the GIL out loud — these come up constantly.
- For data roles, prepare one pipeline you have built end to end and be ready to defend every design choice.
- Do two timed coding problems where you narrate your thinking.
- Finish with a mock interview matched to your actual track, so the questions match the job you want.
Python interviews reward clarity. If you can write readable code and explain the trade-offs behind it, you are most of the way there.